Re: [PATCH 1/9] slub: Make PREEMPT_RT support less convoluted

From: Linus Torvalds
Date: Thu Aug 18 2022 - 13:34:56 EST


On Wed, Aug 17, 2022 at 9:27 AM Sebastian Andrzej Siewior
<bigeasy@xxxxxxxxxxxxx> wrote:
>
> The slub code already has a few helpers depending on PREEMPT_RT. Add a few
> more and get rid of the CONFIG_PREEMPT_RT conditionals all over the place.
>
> No functional change.

Looks like a fine cleanup, but I'd prefer that

#define use_lockless_fast_path() {(true)/(false)}

to look much less like it's some function call. The first read-through
it looked like some very dynamic thing to me.

Just doing

#define USE_LOCKLESS_FAST_PATH ..

would make it much more visually obvious that it's not some kind of
complex run-time decision.

Linus