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 95FFC36167E; Mon, 1 Jun 2026 11:38:36 +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=1780313918; cv=none; b=bfrjJXUoIM6bNrYfdLs94Bsyu/CZa1mOSrJzVgYzbGgdcHDApSPRNUPpUGLZ5lH9P6mduNG3BEth1pp/z/2+2JeTGPYfB76vXMcXfqS185o9ONBXdrOsQUOX5NIAFeA8Qec7dpwrZsG+qG5vY3QdPz9/gx0BkdW2EJGzkZs137E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780313918; c=relaxed/simple; bh=yWtl+vdHKnHBdtbs+68IvHexN87Hi0TjF0PHOeDBak8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T61hxJ6f7B4T1Yg7rH183ipw1LiDFc80ivDFwOfPlTIwAA0s5NFXIWUf103IbvcUuwXZ8agVU62JpC1Pk8DGSXf2Z8JfWiGKl8IM7iRHStB4vqkq8KEh+8dohS/itjlCg05lqnTyVVzaFNoBCDODNgvFOQLukLnXLSAwrlFbtb8= 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 0537468B05; Mon, 1 Jun 2026 13:38:32 +0200 (CEST) Date: Mon, 1 Jun 2026 13:38:31 +0200 From: Christoph Hellwig To: "Vlastimil Babka (SUSE)" Cc: Harry Yoo , Christoph Hellwig , Andrew Morton , Mark Brown , Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Jesper Dangaard Brouer , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, io-uring@vger.kernel.org, kasan-dev@googlegroups.com, bpf@vger.kernel.org, netdev@vger.kernel.org, Alexander Lobakin , Boris Brezillon Subject: Re: [PATCH] mm/slab: improve kmem_cache_alloc_bulk Message-ID: <20260601113831.GA25535@lst.de> References: <20260528093437.2519248-1-hch@lst.de> <20260528093437.2519248-2-hch@lst.de> <5f7f90d8-cb32-4ffb-8f1c-0722aafbe869@kernel.org> <20260529135045.GA10647@lst.de> <5f3ba603-a6ad-4cf2-9a54-aebc10273c59@kernel.org> <58cc76e7-2348-443d-a989-2a06e61178af@kernel.org> Precedence: bulk X-Mailing-List: netdev@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: <58cc76e7-2348-443d-a989-2a06e61178af@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Jun 01, 2026 at 10:16:30AM +0200, Vlastimil Babka (SUSE) wrote: > > kmem_cache_alloc_bulk() returning 0 was considered a success in that case. > > > > Either fixing kmem_cache_alloc_bulk() (and the comment) or fixing the > > user sounds fine to me. > > Would it be wrong if we just returned true for size of 0? Would something > else break? I don't think it is wrong per se, but it feels like the wrong kind of API. I.e. I don't think the MSM caller actually wants this, as they'd also do a zero-sized kvmalloc.