On Wed, 18 Apr 2007, Chaskiel M Grundman wrote:

--On Wednesday, April 18, 2007 02:45:36 PM -0400 Christopher Allen Wing <[EMAIL PROTECTED]> wrote:

I don't understand the usage of AFS_GLOCK(); why is it safe to drop and
re-acquire it in cases like this?  Is AFS_GLOCK intended to serialize all
AFS calls coming from vnode methods in the kernel?

AFS_GLOCK is intended to prevent smp concurrency (and preemption). It also provides mutual exclusion for ObtainXXXLock. AFS_GLOCK is dropped almost any time the cache manager is going to sleep.

Of course that doesn't make it necessarily safe to drop and reacquire. In practice we've just attempted to make it safe every time it's cropped up that it's not.

The __vmalloc approach would be safer if we were even vaguely sure that it was exported in enough cases.



_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to