Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern




On Mar 12, 2007, at 9:06 PM, Andrew Doran wrote:



To elaborate, it can't sleep since it's taken from cpu_switch(), so it
needs to be a spin lock. From kern_ras.c it needs to be taken with the
kernel_lock held, and in cpu_switch() it is taken without the kernel_lock held. So we need to block any interrupts that could take the kernel_lock otherwise there is the potential for deadlock. I have the beginnings of a lock-free version of ras_lookup() somewhere but have not had the time to
finish it or test it further.

Sounds like a good argument for putting it in userret() :-) It's safe to sleep there.

-- thorpej




Home | Main Index | Thread Index | Old Index