tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "Hijacking" a PCU.

On Sat, Dec 15, 2012 at 06:49:13PM +0000, David Laight wrote:
> An alternative would be to make the code that wants to use the
> PCU provide the save area (or probably a place where a malloced
> pointer to the save area will be written).

IMHO it depends on the nature of the "U" in PCU.
For example: sparc64 (not yet using pcu(9)) has a pointer in the uarea
pointing to an fpu save area, allocated on first fpu access in the lwp
(sparc* fpu state is quite big and on sparc64 can be saved in two
halves, i.e. there are two "this part of the regs has been touched" flags).

I did some statistics and did not find a single lwp exiting that had no
fpu state allocated. Maybe some libc changes could change this (if we want),
but on the other hand this clearly points out that the better solution for
this instance of a per cpu unit would be to have it preallocated in every

I am not sure this is true for other instances though.


Home | Main Index | Thread Index | Old Index