From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 46EBA37646A for ; Mon, 13 Jul 2026 06:33:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783924430; cv=none; b=Yub++prfYVziyocZkrISn4FRXNPpAQL4+VsLOUdMF4b7ZRR45sQcNBnhGNNdMl55BzFp67ap2OLzIyIwgZwSwC/m3IAPVspVeD2TNDMPt6EVscEf9Tqtlnn6EBGEHITgmM7BdZDsFQW56o4eFWIULcH3htw7pqRSUtfzxKUf1cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783924430; c=relaxed/simple; bh=2Sommx9ziibIrbJdM4E+Afz6Gf37aWABjVhD2IDuFX0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GSEQGHr52OUDofrHK+QVK8MXx6w1rG3rKfoNtDjly0uP5oswJnG1wnjoyyOETcVjxzK/W17MTvtSKFNFPq7ucrLGM8VgnQLtYE2ZNfxkU8EdnXStCnGJS4i088kbeMp9YKWWdKWKJOnFLq3y+vFXe5JzpWQqbbTfyshbz9BDEok= 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=kU9MgPsy; arc=none smtp.client-ip=91.218.175.179 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="kU9MgPsy" Date: Mon, 13 Jul 2026 14:33:39 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783924425; 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=5B4GwQlb1UCHxXqUPHn4E4HBJOLkT7O9MFp4rT7+++w=; b=kU9MgPsyCLXTUKDnaa/fcQ9ypy/vnLOLjyPj2u90dFeAKLeZzNwVtz5xJVoI12owhHuy5v eXew6Q9WS7iJFGGKBXXio1OnFlnqlPYqcHQUPWAH1p7YZExStXbU1Qt7n6gRLxMwDtpAEI rOt5LaLAPNnecLZcMlPnY4EAxPL8z/Y= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Li To: "Vlastimil Babka (SUSE)" Cc: Harry Yoo , Andrew Morton , Shengming Hu , Christoph Lameter , David Rientjes , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH slab/for-next] mm/slab: simplify freeing remote objects in free_to_pcs_bulk() Message-ID: References: <20260710-bulk_free_remote-v1-1-a878d6dc52d5@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: <20260710-bulk_free_remote-v1-1-a878d6dc52d5@kernel.org> X-Migadu-Flow: FLOW_OUT On Fri, Jul 10, 2026 at 02:04:58PM +0200, Vlastimil Babka (SUSE) wrote: > We have been moving remote objects to an on-stack array and flushing it > when full. Instead, we can swap them towards the beginning of the > supplied array and bulk-free it just once. > > Also add a comment to explain the rationale of freeing remote objects > last, because now it would appear to be simpler to free them first. > > Signed-off-by: Vlastimil Babka (SUSE) > --- > One more cleanup I realized it's possible when processing feedback to > the previous one [1] > > [1] https://lore.kernel.org/all/20260707-slab-simplify-bulk-pcs-v1-1-4850dbe0d904@kernel.org/ > --- > mm/slub.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) Nice idea! Reviewed-by: Hao Li -- Thanks, Hao