[OpenAFS-devel] [PATCH] crget() memory allocation oddity
chas williams - CONTRACTOR
chas@cmf.nrl.navy.mil
Fri, 02 Jun 2006 13:33:59 -0400
In message <9ECA25ADC116985E0A319855@mariner.pc.cs.cmu.edu>,Jeffrey Hutzelman w
rites:
>I'm not so sure. Since the OS doesn't actually have creds like we expect,
>we have to cons them up for every filesystem operation (that is, every time
>crget() is called). That's pretty frequent, and it seems appropriate to
>avoid the overhead of memory allocation every time.
but everytime we dive into crget() we are taking a mutex and grabbing
an entry from the pool. that's essentially what kmalloc does most of
the time anyway. you could save a little bit of memory not keeping
track of the same buffers twice. i suspect empirical testing would
be necessary to decide if there is any perceptable difference.