Re: [patch 2/2] x86,fpu: lazy allocation of FPU area

2008-02-24 Thread Siddha, Suresh B
On Sun, Feb 24, 2008 at 01:20:05PM +0100, Andi Kleen wrote: > On Sat, Feb 23, 2008 at 06:34:39PM -0800, Suresh Siddha wrote: > > 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. > > Did you

Re: [patch 2/2] x86,fpu: lazy allocation of FPU area

2008-02-24 Thread Andi Kleen
On Sat, Feb 23, 2008 at 06:34:39PM -0800, Suresh Siddha wrote: > 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. Did you measure this making any difference? At least at some point glibc alway

Re: [patch 2/2] x86,fpu: lazy allocation of FPU area

2008-02-23 Thread Christoph Hellwig
On Sat, Feb 23, 2008 at 06:34:39PM -0800, Suresh Siddha wrote: > + if (!tsk->thread.cntxt) > +tsk->thread.cntxt = alloc_cntxt_struct(); Please use tabs, not spaces for indentation. > +union thread_cntxt *alloc_cntxt_struct(void) > +{ > + return kmem_cache_alloc(task_cntxt_

[patch 2/2] x86,fpu: lazy allocation of FPU area

2008-02-23 Thread Suresh Siddha
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. Signed-off-by: Suresh Siddha <[EMAIL PROTECTED]> Cc: Arjan van de Ven <[EMAIL PROTECTED]> --- Index: linux-2.6-x86/arch/x86/kernel/i387.c ===