From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 240A735E92F for ; Thu, 18 Jun 2026 08:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770200; cv=none; b=Azf3f6i914RJVoUUzZBPg4D853ti580M7nMq+SdyIB4skPfzIxawO9x/tQg3CTtNkx3Lhm9zVabpyRhJUuG+du+y0QYiCJBljYc+ypTW5SF1YSgmlgtLyI2lS7gekVolICf60A4lieh8nQ5ZqnN0MYsvqYwZaKzuS7YfGtS0uNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770200; c=relaxed/simple; bh=hm3pcLfPpufbBAae83s/z1mFxIUSczuS+WqOOg/pV5o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WXsToz7U52AnN4sTIKonhEx2leW4HM0haZGAc9Q5WPjhLLXfKpXMLkSpkuIuLdvmDxu/q/U9q+TGVFmjI3O58LpVY/SIWF7/dTsFPNx8Qs/wrnUK0ppZHDT3EcsvUteGptk8krIZefFTzdER48h3B62A6GeIluAXo2CmaZ9L+XE= 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=uLPXuD4N; arc=none smtp.client-ip=91.218.175.171 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="uLPXuD4N" Date: Thu, 18 Jun 2026 16:09:44 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781770196; 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=hPz+/6ozPt/d74JBAdAyoBjizvXRlrgjpuqP5wOKvag=; b=uLPXuD4NEEQLwI/WTOt7gNtfmYXk+DRz/v5gPNoYBL6JiuYWOC4+KiGR3iVq3QdkgA3ih6 QiIuV951SK9PzO02tMc9C8sWK8BnaFdXeIquOeXMnz6gGNfGCDXlhYoVk/RWqc/dEb7xNr 9CLAngLDI8yBa2rXlvgZeq7y1B7VVLE= 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 , Christoph Lameter , David Rientjes , Roman Gushchin , Suren Baghdasaryan , Alexei Starovoitov , Andrew Morton , Johannes Weiner , Michal Hocko , Shakeel Butt , Alexander Potapenko , Marco Elver , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v3 10/15] mm/slab: allow kmem_cache_alloc_bulk() with any gfp flags Message-ID: References: <20260615-slab_alloc_flags-v3-0-ce1146d140fb@kernel.org> <20260615-slab_alloc_flags-v3-10-ce1146d140fb@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: <20260615-slab_alloc_flags-v3-10-ce1146d140fb@kernel.org> X-Migadu-Flow: FLOW_OUT On Mon, Jun 15, 2026 at 01:54:43PM +0200, Vlastimil Babka (SUSE) wrote: > The last user of gfpflags_allow_spinning() in slab is > alloc_from_pcs_bulk(), which is only called from > kmem_cache_alloc_bulk(). > > It turns out that gfpflags_allow_spinning() is not necessary, because > kmem_cache_alloc_bulk() is only expected to be called from context that > does allow spinning, so simply replace it with 'true'. This means we can > also drop the gfp parameter from alloc_from_pcs_bulk(). > > With that, we can remove the "@flags must allow spinning" part of the > kernel doc, as there is no more connection to the gfp flags in the slab > implementation. > > Also remove a comment in alloc_slab_obj_exts() because there should be > no more false positives possible due to gfp_allowed_mask during early > boot. > > Link: https://patch.msgid.link/20260610-slab_alloc_flags-v2-11-7190909db118@kernel.org > Reviewed-by: Suren Baghdasaryan > Signed-off-by: Vlastimil Babka (SUSE) > --- Looks good to me. Reviewed-by: Hao Li -- Thanks, Hao