From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 89FDE14A8E for ; Mon, 24 Nov 2025 06:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763965045; cv=none; b=lnZDTkQHXpCZEIGHTIgT0nTv3F6q20GVBpkAeDCuidjhmj41IBrQqP7d3FULnV1dCkxOSzXZj7LAyx60oq2Eds3ERygsQs048ESZUbUou35/K9O6K5/8uTOVooeuWKmZWQa8UwnON4JzD8uYcTlrLJylZKvN/q/nanIHXgJAdpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763965045; c=relaxed/simple; bh=V7n1/6nm7ycrN2Qpvyy+IlEk5aqZlHeKTGHxnZjfBkM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fhi+vJk58QhxsDz0aHAtooGtRTBNbJgN6olBoG2nonluJ+pO9k9YVb2BhokHV3WexfHUT25Wgquq0oiKAg8xfu0irrDjicpcqBXE/3iu4USKbyDbx5//ZrRkmoimxl4sVeVrGL8umlLXLWnDf8UjxajbA396wgEWBbuRzgVjek4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id E8D6968BFE; Mon, 24 Nov 2025 07:17:17 +0100 (CET) Date: Mon, 24 Nov 2025 07:17:17 +0100 From: Christoph Hellwig To: Hugh Dickins Cc: Vlastimil Babka , Christoph Hellwig , Andrew Morton , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Zi Yan , Eric Biggers , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] mempool: factor out a mempool_alloc_from_pool helper Message-ID: <20251124061717.GC16260@lst.de> References: <20251113084022.1255121-1-hch@lst.de> <20251113084022.1255121-7-hch@lst.de> <7b1265bc-835e-4c7d-af75-f237c46bc3a7@suse.cz> <566ce586-4d53-f2d8-50b6-1f884f44d2c9@google.com> 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: <566ce586-4d53-f2d8-50b6-1f884f44d2c9@google.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Sun, Nov 23, 2025 at 09:49:08AM -0800, Hugh Dickins wrote: > I agree it's confusing, and calls into question whether that was a good > refactoring. What part is confusing? > (I also wondered if it's right to pool->alloc before alloc from mempool > after the wait was for a mempool element to be freed: but that's how it > was before, and I expect it's been proved in the past that a strict > pool->alloc before alloc from mempool is the best strategy.) In general given how good the allocator is at satisfying small request you might get something from the general pool quicker than the reserved lists, especially if the io_schedule timeout hits.