Skip to content

sched: Make task_struct::thread constant size, x86/fpu: Remove thread::fpu

Ingo Molnar lkml 1 version Applied

Status from this message: The following commit has been merged into the x86/merge branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8x86/fpu: Introduce the x86_task_fpu() helper methodarch/x86/include/asm/processor.h+2 -00 replies
2/8x86/fpu: Convert task_struct::thread.fpu accesses to use x86_task_fpu()arch/x86/include/asm/fpu/sched.h arch/x86/kernel/fpu/context.h arch/x86/kernel/fpu/core.c +12 more+68 -680 replies
3/8x86/fpu: Make task_struct::thread constant sizearch/x86/include/asm/processor.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/init.c +2 more+36 -410 replies
4/8x86/fpu: Remove the thread::fpu pointerarch/x86/include/asm/processor.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/init.c +2 more+6 -106 replies
5/8x86/fpu: Push 'fpu' pointer calculation into the fpu__drop() callarch/x86/include/asm/fpu/sched.h arch/x86/kernel/fpu/core.c arch/x86/kernel/process.c+5 -40 replies
6/8x86/fpu: Make sure x86_task_fpu() doesn't get called for PF_KTHREAD|PF_USER_WORKER tasks during exitarch/x86/kernel/fpu/core.c arch/x86/kernel/process.c+8 -22 replies
7/8x86/fpu: Remove init_task FPU state dependencies, add debugging warning for PF_KTHREAD tasksarch/x86/include/asm/processor.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/init.c +2 more+17 -140 replies
8/8x86/fpu: Use 'fpstate' variable names consistentlyarch/x86/include/asm/fpu/api.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/xstate.c+10 -100 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by.

PatchOleg NesterovChang S. Bae
1/8
2/8
3/8Fixed-by
4/8
5/8
6/8Fixed-by
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH -v5 0/8] sched: Make task_struct::thread constant size, x86/fpu: Remove thread::fpu

This series is one of the dependencies of the fast-headers work, which aims to reduce header complexity by removing <asm/processor.h> from the <linux/sched.h> dependency chain, which headers are headers are fat enough already even if we do not combine them.

To achieve that decoupling, one of the key steps is to not embedd any C types from <asm/processor.h> into task_struct.

The only architecture that relies on that in a serious fashion is x86, via the 'struct thread::fpu' variable size structure. The series below attempts to resolve it by using a calculated fpu context area address value via the x86_task_fpu() helper. The allocation layout of task_struct + fpu-save-area doesn't change.

The -v5 version is a refresh of the -v4 series to v6.15-rc1.

The Git tree of these commits can also be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/fpu

Thanks,

Ingo

===============>
Ingo Molnar (8):
x86/fpu: Introduce the x86_task_fpu() helper method
x86/fpu: Convert task_struct::thread.fpu accesses to use x86_task_fpu()
x86/fpu: Make task_struct::thread constant size
x86/fpu: Remove the thread::fpu pointer
x86/fpu: Push 'fpu' pointer calculation into the fpu__drop() call
x86/fpu: Make sure x86_task_fpu() doesn't get called for PF_KTHREAD|PF_USER_WORKER tasks during exit x86/fpu: Remove init_task FPU state dependencies, add debugging warning for PF_KTHREAD tasks x86/fpu: Use 'fpstate' variable names consistently

 arch/x86/include/asm/fpu/api.h   |  2 +-
 arch/x86/include/asm/fpu/sched.h |  4 +-
 arch/x86/include/asm/processor.h | 23 ++++++------
 arch/x86/kernel/fpu/context.h    |  4 +-
 arch/x86/kernel/fpu/core.c       | 80 +++++++++++++++++++++++-----------------
 arch/x86/kernel/fpu/init.c       | 21 ++++++-----
 arch/x86/kernel/fpu/regset.c     | 22 +++++------
 arch/x86/kernel/fpu/signal.c     | 18 ++++-----
 arch/x86/kernel/fpu/xstate.c     | 27 ++++++--------
 arch/x86/kernel/fpu/xstate.h     |  6 +--
 arch/x86/kernel/process.c        |  9 ++---
 arch/x86/kernel/signal.c         |  6 +--
 arch/x86/kernel/traps.c          |  2 +-
 arch/x86/math-emu/fpu_aux.c      |  2 +-
 arch/x86/math-emu/fpu_entry.c    |  4 +-
 arch/x86/math-emu/fpu_system.h   |  2 +-
 arch/x86/mm/extable.c            |  2 +-
 include/linux/sched.h            | 15 ++------
 18 files changed, 126 insertions(+), 123 deletions(-)
Signature · 1 line
2.45.2