Re: [RFC] [PATCH] cache pollution aware __copy_from_user_ll()

Akira Tsukamoto
2005-08-18T02:30:59Z

On Wed, 17 Aug 2005 23:30:13 +0900
Akira Tsukamoto <akira-t@suna-asobi.com> mentioned:
> > I'm trying to understand this mechanism but I don't
> > understand very well.
>
> My explanation was a bit ambiguous, see the code below.
> Where the fp register saved? It saves fp register *inside* task_struct,

More clarification, to make fp_save generic,
after exception, such as pagefault, copy function might get nested,
during page allocation.
First it has user space fp content, but nested copy needs to save
kernel space fp content which came from the first copy function.
So saving into task_struct is bit problem.

XMM_SAVE/XMM_RESTORE uses stack for it.
Surrounding copy loop with XMM_SAVE/XMM_RESTORE should work.

Some might claim that, saving/restore every time might a big overhead,,,
but i think it is better than having a lot of cache miss hit.

Isn't there some way to avoid long preemption disabling?

--
Akira Tsukamoto <akira-t@suna-asobi.com, at541@columbia.edu>