From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6D6D52D6E67 for ; Fri, 20 Mar 2026 10:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774000980; cv=none; b=QY+wRbQLzzzbC/xC5mrNfV+9ZVQHfx8eTP7/Ckxt9xlF1H5s0WApKq/B3KNC1nZqTfVlzEmg088vzmD9crqFqsed+awRSZWSj6Yve6YZs6xpv1iyKPTJlVLk157A+YitbJcQ4gBNWKp86pbGYPSRV5zCZRvpZSLuhclPC/vOFPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774000980; c=relaxed/simple; bh=biwiaMzX/KeICnsebZ6pl4sMZMlXYFRAJ83TtXxoqV8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mSUoKuABybPI95Fp99e6zenQb0fyx6ZJ59069/VvZPk+VO2FtsQ+k9j3XizO33z/PTZWb6fUdXyfQVql/6FtNH4yGf9/ujeGOFDWczsz7H1URoFCIPBN+CK05BpI75V9GhAc/Y7iH2awiFn1/3DObVQQlRwKNSgt7bgJIyOzs18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oUy4Hb5+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oUy4Hb5+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F705C4CEF7; Fri, 20 Mar 2026 10:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774000980; bh=biwiaMzX/KeICnsebZ6pl4sMZMlXYFRAJ83TtXxoqV8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oUy4Hb5+/P8MX/PrlvRLQVq8G2rjpxqY9PXgxaJx8GMWTufvB36jG2M//fkYsl3vw tF2XSVIwtNHSP1rfDrvKvjU8ASrWo9oTvrCOmk69sEm+vSSn9Jfn60GqytYviA3fur E/0/TrwbHZe6gQxqDQWFE99h53YiQYuhap7EQqE+L543eA/Ji9/xC//wZR5heo25Kj HC8J08N1mMcPoiMNpiob9oJXsFSGAiSUJ0byFR+1bZuyUKweQJCl3po0dK12XTfShP 0tQnXYuNv+IqS7zZYSPpAVASYn0HPUClCemJ5HevF29fArmGQvk6qT3eVCWGS2U3qR P7hwWo9eP+NDg== Message-ID: Date: Fri, 20 Mar 2026 11:02:55 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/5] mm: Switch gfp_t to unsigned long Content-Language: en-US To: Brendan Jackman , Matthew Wilcox Cc: Andrew Morton , Michal Hocko , David Rientjes , Shakeel Butt , Suren Baghdasaryan , Johannes Weiner , Zi Yan , Harry Yoo , Hao Li , Christoph Lameter , Roman Gushchin , Uladzislau Rezki , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20260319-gfp64-v1-0-2c73b8d42b7f@google.com> From: "Vlastimil Babka (SUSE)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/20/26 10:48, Brendan Jackman wrote: > On Thu Mar 19, 2026 at 9:39 PM UTC, Matthew Wilcox wrote: >> On Thu, Mar 19, 2026 at 06:40:59PM +0000, Brendan Jackman wrote: >>> I will paste the diff at the bottom. I _think_ all the problematic >>> expansions are downstream of struct xarray, but it's quite likely my >>> sense for problematic struct expansions is weak. >> >> Urgh, no, it's not all xarray. There's one in address_space which we're >> trying to shrink, not grow. > > Oh sorry I just assumed that one was xa_flags. > >> There's one in struct sock too. > > Huh, I suspect I am embarassing myself with this question, but why are > we sensitive to the size of struct sock? It's currently 784 bytes in my > build. Are the adjacent fields very hot, and we need to look up the GFP > flags from hot paths? > >> I don't think this idea is worth it. There are other projects of greater >> or lesser churniess which will give us some flags back. For example, >> we could finish the GFP_NOFS and GFP_NOIO removal. We could finish the >> radix_tree -> XArray removal and get back three bits. That's five bits >> without even starting new projects, just finishing old ones. > > Anyway, this also makes sense. But, Vlastimil, I guess you had an > ulterior motive for this suggestion? Partially. After seeing various issues with kmalloc_nolock() relying on lack of __GFP_KSWAPD_RECLAIM to indicate the nolock, it would be great to just add another gfp flag for it, but with only few left, I didn't dare. But I'll admit it wasn't well thought idea out wrt consequences. Sorry that nobody shot it down before you actually tried to implement it.