lkml.org 
[lkml]   [2021]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[patch] mm/slub: Replace do_slab_free() local_lock_irqsave/restore() calls in PREEMPT_RT scope
    From
    Date

    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@gmx.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
    \
     
     \ /
      Last update: 2021-07-09 07:22    [W:3.487 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site