Subject: Re: linux_sendsig not SMP firendly?
To: Emmanuel Dreyfus <firstname.lastname@example.org>
From: Bill Sommerfeld <email@example.com>
Date: 06/01/2001 17:48:39
> linux_sendsig uses curproc in all architectures. As I understood, this
> is not SMP friendly. The fix seems to just add a struct proc argument
> and pass the current proc. Is this right?
not necessary for correctness; it's largely a performance thing.
current SMP platforms have macros in <machine/cpu.h> so that curproc
"works" with SMP. exactly what's necessary to find the current cpu's
curproc varies; it may be "as cheap" as referencing a global variable
or two, or it may involve a function call or palcode call followed by
some memory references.
If the caller already has the curproc which was passed in as part of
the syscall handler, you might as well pass it through. On the other
hand, adding an additional function argument to a dozen functions to
avoid a single deeply buried curproc is probably not worthwhile.