lkml.org 
[lkml]   [2008]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ABI change for device drivers using future AVX instruction set
Andi Kleen wrote:
>>>
>> If you use xsave, I don't see how this is different to the user fpu save
>> area.
>
> For once there's no clear error handling path for allocation failures
> on the (arbitarily sized) xsave state. On user code that can be barely
> tolerated, but for the kernel it would be deadly.
>

Well, that's relatively easily dealt with... you'd have to allocate that
state save area explicitly in kernel_fpu_begin(), and it would be up to
the callers of that function to handle the resulting sleep and/or
allocation failure -- we could even make kernel_fpu_begin() take a GFP_*
flag.

Now, there are a few possibilities what to do with said state area. One
is to make it associated with the task; if used for something as RAID,
this would mean pretty soon *all* (or nearly all) tasks have such a
state area, and we might as well go back to allocating them preemptively
on thread creation. The other, of course, is to destroy it in
kernel_fpu_end(). This may cause quite a bit of allocation/deallocation
overhead, but perhaps this would be a decent use of a quicklist.

-hpa




\
 
 \ /
  Last update: 2008-06-30 00:19    [W:0.054 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site