> On May 13, 2021, at 10:57 AM, Visa Hankala <v...@hankala.org> wrote:
> 
> On Thu, May 13, 2021 at 12:04:57AM -0500, Scott Cheloha wrote:
>> The funky locking dance in softclock() and softclock_thread() is
>> needed to keep from violating the locking hierarchy.  The
>> timeout_mutex is above the kernel lock, so we need to leave the
>> timeout_mutex, then drop the kernel lock, and then reenter the
>> timeout_mutex to start running TIMEOUT_MPSAFE timeouts.
> 
> Are you sure that dropping the kernel lock in softclock(), in
> non-process context, is a good idea? That makes assumptions how the
> layers above work.

I figured it was the most obvious way forward.

When you say "layers above," do you mean softintr_dispatch()?
Or something else?

> At the minimum, I think the soft interrupt code has to be changed so
> that it is possible to register MP-safe handlers.

Some platforms (e.g. arm64) have softintr_establish_flags(), but this
is not universally available.

Do I need to unlock all the softintr internals before proceeding
with this?  Or do I just need to bring softrintr_establish_flags()
to every platform without it?

Reply via email to