On Mon, Jul 7, 2014 at 1:46 PM, Matthew Dempsky <[email protected]> wrote:
> p_sigmask is only modified by the owning thread from process context > (e.g., sys_sigprocmask(), sys_sigreturn(), userret(), or postsig()), > but it can be accessed anywhere (e.g., interrupts or threads on other > CPUs). Currently sys_sigprocmask() protects p_sigmask with splhigh(), > but that's not MP-safe. > (warning: "MP-safe" used before definition.) While moderately cool, I don't think this is the right direction to go for two reasons: * using atomics when we don't even have correct process-pending signals risks a solution that doesn't work when more than one pending set has to be examined. In the mean time, atomics do have a cost in bus contention, so would we just end up pulling the atomics back out after putting this stuff under a mutex or rwlock? * something tells me you're looking at this because it's a tall pole in syscall counts because of ld.so..but I'm working to drop it from the top 20 syscalls as a side-effect of adding __kbind() Philip Guenther
