[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9b2dbb062bd25d9f6c0b918c3c834bc6964c2d6.camel@gmx.de>
Date: Fri, 09 Jul 2021 07:20:48 +0200
From: Mike Galbraith <efault@....de>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Cc: linux-rt-users@...r.kernel.org,
Mel Gorman <mgorman@...hsingularity.net>,
Vlastimil Babka <vbabka@...e.cz>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [patch] mm/slub: Replace do_slab_free()
local_lock_irqsave/restore() calls in PREEMPT_RT scope
IRQ affecting local lock operations are intended for dual RT/!RT scope,
only affect IRQs in !RT scope. Replace misplaced do_slab_free() calls
with plain local_lock()/local_unlock(). Purely cosmetic.
Signed-off-by: Mike Galbraith <efault@....de>
---
mm/slub.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3362,13 +3362,12 @@ static __always_inline void do_slab_free
* we need to take the local_lock. We shouldn't simply defer to
* __slab_free() as that wouldn't use the cpu freelist at all.
*/
- unsigned long flags;
void **freelist;
- local_lock_irqsave(&s->cpu_slab->lock, flags);
+ local_lock(&s->cpu_slab->lock);
c = this_cpu_ptr(s->cpu_slab);
if (unlikely(page != c->page)) {
- local_unlock_irqrestore(&s->cpu_slab->lock, flags);
+ local_unlock(&s->cpu_slab->lock);
goto redo;
}
tid = c->tid;
@@ -3378,7 +3377,7 @@ static __always_inline void do_slab_free
c->freelist = head;
c->tid = next_tid(tid);
- local_unlock_irqrestore(&s->cpu_slab->lock, flags);
+ local_unlock(&s->cpu_slab->lock);
#endif
stat(s, FREE_FASTPATH);
} else
Powered by blists - more mailing lists