diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-03-10 18:28:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:55 -0400 |
commit | aa283f49276e7d840a40fb01eee6de97eaa7e012 (patch) | |
tree | b17b134b174666e482b1a8ad486436a3d5cdb83e /arch/x86/kernel/process_32.c | |
parent | 61c4628b538608c1a85211ed8438136adfeb9a95 (diff) |
x86, fpu: lazy allocation of FPU area - v5
Only allocate the FPU area when the application actually uses FPU, i.e., in the
first lazy FPU trap. This could save memory for non-fpu using apps.
for example: on my system after boot, there are around 300 processes, with
only 17 using FPU.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 3890a5dd25f9..7adad088e373 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -521,6 +521,10 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) | |||
521 | regs->cs = __USER_CS; | 521 | regs->cs = __USER_CS; |
522 | regs->ip = new_ip; | 522 | regs->ip = new_ip; |
523 | regs->sp = new_sp; | 523 | regs->sp = new_sp; |
524 | /* | ||
525 | * Free the old FP and other extended state | ||
526 | */ | ||
527 | free_thread_xstate(current); | ||
524 | } | 528 | } |
525 | EXPORT_SYMBOL_GPL(start_thread); | 529 | EXPORT_SYMBOL_GPL(start_thread); |
526 | 530 | ||