lkml.org 
[lkml]   [2008]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] x86, fpu: split FPU state from task struct - v2

* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> Split the FPU save area from the task struct. This allows easy
> migration of FPU context, and it's generally cleaner. It also allows
> the following two optimizations:
>
> 1) only allocate when the application actually uses FPU, so in the
> first lazy FPU trap. This could save memory for non-fpu using apps.
> Next patch does this lazy allocation.
>
> 2) allocate the right size for the actual cpu rather than 512 bytes
> always. Patches enabling xsave/xrstor support (coming shortly) will
> take advantage of this.

thanks, i've applied your two patches to x86.git#testing.

the #ifdefs are still a bit ugly:

> +#ifndef arch_task_cache_init
> +#define arch_task_cache_init()
> +#endif

use a __weak alias instead. (that way if an architecture defines the
function, that function takes over automatically at link time, without
any #ifdef complications)

> +#ifndef arch_dup_task_struct
> +static inline int arch_dup_task_struct(struct task_struct *dst,
> + struct task_struct *src)
> +{
> + *dst = *src;
> + return 0;
> +}
> +#endif

ditto.

Ingo


\
 
 \ /
  Last update: 2008-03-03 09:53    [W:0.056 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site