Re: [PATCH RFC 09/19] slab: add optimized sheaf refill from partial list
From: Harry Yoo
Date: Mon Oct 27 2025 - 05:18:40 EST
On Mon, Oct 27, 2025 at 04:20:56PM +0900, Harry Yoo wrote:
> On Thu, Oct 23, 2025 at 03:52:31PM +0200, Vlastimil Babka wrote:
> > + if (unlikely(!list_empty(&pc.slabs))) {
> > + struct kmem_cache_node *n = get_node(s, node);
> > +
> > + spin_lock_irqsave(&n->list_lock, flags);
>
> Do we surely know that trylock will succeed when
> we succeeded to acquire it in get_partial_node_bulk()?
>
> I think the answer is yes, but just to double check :)
Oh wait, this is not per-cpu lock, so the answer is no!
We need to check gfpflags_allow_spinning() before spinning then.
--
Cheers,
Harry / Hyeonggon