[OpenAFS-devel] Re: PAGs/tokens/threads

Simon Wilkinson sxw@inf.ed.ac.uk
Fri, 7 Aug 2009 18:33:50 +0100


On 7 Aug 2009, at 17:29, Andrew Deason wrote:

> On Fri, 7 Aug 2009 15:29:38 +0200 (CEST)
> Alberto Mancini <mancini@math.unifi.it> wrote:
>
>>
>> On Fri, 7 Aug 2009, Simon Wilkinson wrote:
>>
>>> The current implementation only looks at the keyring if it can't
>>> determine the PAG from the process's groups. If it has to use the
>>> keyring, then it attempts to set the process's group list, so that
>>> the group is used for all future lookups.
>>
>> Is this for performance reasons (or for something i do not see) or
>> is just an implementation side-effect ?
>
> I'm not authoritative, but I just thought of one possible reason for
> this. If you only have keyrings and no gids representing the PAGs, it
> /looks/ like (I'm not sure) that the hourly GCPAGs will destroy them.
> Since that detects used PAGs by traversing the process list,  
> identifying
> the PAG in a process, and flagging that PAG as used.

I'm pretty sure that GCPAGs is disabled when keyring support is in  
use. Garbage collection there is done by hooking the keyring  
destruction callback (which unfortunately, means that we can end up  
holding the GLOCK whilst the kernel has a spinlock.)

S.