linux/arch/x86/kernel/fpu
Dave Hansen 0c8c0f03e3 x86/fpu, sched: Dynamically allocate 'struct fpu'
The FPU rewrite removed the dynamic allocations of 'struct fpu'.
But, this potentially wastes massive amounts of memory (2k per
task on systems that do not have AVX-512 for instance).

Instead of having a separate slab, this patch just appends the
space that we need to the 'task_struct' which we dynamically
allocate already.  This saves from doing an extra slab
allocation at fork().

The only real downside here is that we have to stick everything
and the end of the task_struct.  But, I think the
BUILD_BUG_ON()s I stuck in there should keep that from being too
fragile.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1437128892-9831-2-git-send-email-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-18 03:42:35 +02:00
..
bugs.c x86/fpu/init: Propagate __init annotations 2015-05-19 15:48:11 +02:00
core.c x86/fpu: Standardize the parameter type of copy_kernel_to_fpregs() 2015-05-27 14:11:32 +02:00
init.c x86/fpu, sched: Dynamically allocate 'struct fpu' 2015-07-18 03:42:35 +02:00
Makefile
regset.c x86/fpu: Rename fpu__activate_fpstate() to fpu__activate_fpstate_write() 2015-05-27 14:11:26 +02:00
signal.c x86/fpu: Pass 'struct fpu' to fpu__restore() 2015-05-19 15:48:11 +02:00
xstate.c x86/fpu: Fix double-increment in setup_xstate_features() 2015-06-12 10:48:12 +02:00