[OpenAFS-devel] global lock and smp
Jeffrey Hutzelman
jhutz@cmu.edu
Mon, 29 Aug 2005 14:24:11 -0400
On Monday, August 29, 2005 01:52:51 PM -0400 Jim Rees <rees@umich.edu>
wrote:
> Am I correct in thinking that the global lock is only required for SMP?
> If I have a traditional unix kernel that's not pre-emptive while in kernel
> mode, can I make the global lock a no-op?
If you're doing a platform port, and there is no chance one thread in AFS
code can be interrupted by another thread in AFS code, short of the first
thread deliberately sleeping, then yes, you can make the glock a noop.
This is generally the case on non-SMP systems which don't do preemption of
kernel code.
Like chas, I suspect the benefit of doing this is marginal, if your OS is
capable of running on SMP machines and provides a mutex primitive, you
probably should just use it.