lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 11/26] mm, slub: move disabling irqs closer to get_partial() in ___slab_alloc()
On Tue, May 25, 2021 at 1:40 AM Vlastimil Babka <vbabka@suse.cz> wrote:
> Continue reducing the irq disabled scope. Check for per-cpu partial slabs with
> first with irqs enabled and then recheck with irqs disabled before grabbing
> the slab page. Mostly preparatory for the following patches.
[...]
> diff --git a/mm/slub.c b/mm/slub.c
[...]
> if (slub_percpu_partial(c)) {
> + local_irq_save(flags);
> + if (unlikely(c->page)) {
> + local_irq_restore(flags);
> + goto reread_page;
> + }
> + if (unlikely(!slub_percpu_partial(c))) /* stolen by IRQ? */
> + goto new_objects;

nit: I think this comment is wrong by the end of the patch series,
since at that point, in RT configurations, it could also be stolen by
another task, if I understand correctly what migrate_disable() means?

Similarly the comment above ___slab_alloc() still talks about
disabling preemption for bulk allocation.

\
 
 \ /
  Last update: 2021-05-25 18:01    [W:0.237 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site