From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89D2B1A6831 for ; Mon, 1 Jun 2026 05:26:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780291611; cv=none; b=pmXO8sRP/sbaEAJZxRI8NtOtmUK18oYb9VVPGifPH/4uccUnrLpoCnOcw6Hj+xq3bH+RDVNyVHD/F/rbHCZrcT3UWqsI8QKSw8R5w2xSe0v9gOGCIvl0DLRG3eAUzLcdBvK2WGEaHh8Ndmd9M3yR620X17iCO/QW8bPiY38WX/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780291611; c=relaxed/simple; bh=xAta23+c9gVlmy0sJHzKrer2EOy7gGoZ4Cj9fYUInEo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cNu1HURoe4hoxihAbuBqc+RwZAf+4izayVYvsDkfxNKUzkFyZRswwJWUzQQ5k2Aot5R2tvUVtNW79Xf+/6uPDwOHXyVa43CLuMQwUXlIu2eHivGZiRdlb7xuUT6X0EA+PzeUgpt8vcYgZultZ7UBO5QU1gl0i+LjlHhn8YFE25c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=q8Qc/awu; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="q8Qc/awu" Date: Mon, 1 Jun 2026 13:26:31 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780291606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YtOXwa25C4vrU9f04Y4XaGTk/Jc7P4Jl39cBxI5Wx9g=; b=q8Qc/awu8wjej7TCUDd1zk5jcCLgIZMVDtzQBo7W4xXVZzt7QWn5s8/hZlavNEKpJjEs7i wnUYqP/4NQW7UjC/PQDIpsKN18xV7sBdRAqaqneh/sAGhG0XI9fdXzugOiM8JTvRjAnks+ vQ7S+iQwg+dCtSNtx4Rli5akXwoJzWY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Li To: Harry Yoo Cc: vbabka@kernel.org, akpm@linux-foundation.org, cl@gentwo.org, rientjes@google.com, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] mm/slub: introduce helpers for node partial slab state Message-ID: References: <20260529035120.81304-1-hao.li@linux.dev> <20260529035120.81304-2-hao.li@linux.dev> <5ed81b4a-1d18-4535-a18c-1bb31969ae78@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ed81b4a-1d18-4535-a18c-1bb31969ae78@kernel.org> X-Migadu-Flow: FLOW_OUT On Mon, Jun 01, 2026 at 12:38:48PM +0900, Harry Yoo wrote: > > > On 5/29/26 12:50 PM, Hao Li wrote: > > Wrap partial slab count inc/dec and flag set/clear into > > helper functions to reduce code duplication. > > > > Note that __add_partial() is called locklessly in > > early_kmem_cache_node_alloc(), but since there is no such use case for > > removal, __remove_partial() does not exist. > > nit: __remove_partial() -> clear_partial_node_state() Ah, in this sentence, I just wanted to clarify that __remove_partial doesn't exist. it's not a typo :) > oh wait, it does exist. Let's drop this paragraph? This paragraph is just a quick side note to explain why __remove_partial() doesn't exist. I noticed that __add_partial lacks a symmetric counterpart, which felt a bit abrupt/inconsistent, so I wanted to share some context on why that is. Historically, the __remove_partial function did exist. Back then, we had a use case where free_partial called __remove_partial without holding the lock. Later, free_partial was changed to call remove_partial under the lock, which is why __remove_partial was eventually removed in commit 52b4b950b50740bff507a62907e86710743c22e7. > > Otherwise LGTM! > Reviewed-by: Harry Yoo (Oracle) Thanks! > > > Suggested-by: Harry Yoo > > Signed-off-by: Hao Li > -- Thanks, Hao