On Sun, 20 Aug 2023 at 14:41, Mateusz Guzik <mjguzik@xxxxxxxxx> wrote: > > On 8/20/23, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > > Except now we search the exception tables every time we call it. > > The now-deleted comment (c2508ec5a58d) suggests this is slow: Yeah, that was the intent. But I agree that we should basically avoid trying to sleep just as we got the lock. > My first patch looked like this: Well, that's disgusting and strange. > - might_sleep(); > +#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) > + __might_sleep(__FILE__, __LINE__); > +#endif Why would you have that strange #ifdef? __might_sleep() just goes away without that debug option anyway. But without that odd ifdef, I think it's fine. Linus