Re: [PATCH v2 3/3] i387: support lazy restore of FPU state

From: Suresh Siddha
Date: Tue Feb 21 2012 - 17:20:24 EST


On Tue, 2012-02-21 at 13:57 -0800, Linus Torvalds wrote:
> On Tue, Feb 21, 2012 at 1:54 PM, Suresh Siddha
> <suresh.b.siddha@xxxxxxxxx> wrote:
> >
> > Reviewing this code, I think we need to set the 'last_cpu' to an invalid
> > number in the fpu_alloc too. Appended is the patch.
>
> I cleared fpu_counter in copy_thread() instead.

Hmm, didn't pay attention to that patch. Too many patches ;(

> Doing this in fpu_alloc() isn't necessarily a bad idea, though.

yes, I think we should do this in fpu_alloc() or bit more explicitly by
updating 'last_cpu' in copy_thread().

Someone experimenting with removing fpu pre-load may not realize this
subtle issue.

thanks,
suresh




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/