From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F15B33B9D8B for ; Fri, 20 Mar 2026 13:22:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774012984; cv=none; b=aGZo08QUpsh1IGiyNkf8x8HLgUo4586hN3tqzVEBb0ty37mDCumpXVfpFcgHPRGORpr2gTGuiK1olvPEenVSx8i2a2CDTXSJqPhvCCzIFkaq14aYuENAifsFRyyhbmo7MhpxDosuMJyIIUsIOk0n8bkzP/La+PK02TQwBb94/WM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774012984; c=relaxed/simple; bh=Ilr1P7sUY+IGl4WqlMnCljPfZnYS13TPJxn8HYt3bOY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KjpszzW58WuQ/x8BAlJI29HJ1HC583wEwSMqDrhYwzadkvPv1lLNMYCJe+uJ0J5HgxD3/kJ4HGgrOpZXW6X16u5vODugUd+Y8tYiqDNtUrvO5SwLGNwerJ/V+ohVApbazxy9V95x1Ot5O6BlaBxlM2UkZQyLobRXKnwk9Ze8+Xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=miedwtkn; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="miedwtkn" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-483786a09b1so20802675e9.3 for ; Fri, 20 Mar 2026 06:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1774012978; x=1774617778; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=GUDqodDk43yn3drXIlYhMhMKH+w2qm8q4A3+LPiJy1Y=; b=miedwtkn4sHeTrJkEKVWUIQRdPxgTGwkFRopp0tfKAIYBohYy8MyoDRQFAVTP9bfo6 W4NoDh+qREMaIFVGG+zeZZxeiv9xRZYLhWoIG7aGe+B9+OURMEUmSVPfzkdq51KOQSS5 LPY5FA4OKzwu+TGxuN/oG88PoNk/ZiTxh7f0/E27cgeyQcV13ioIIgzOXZwWjVp0YyA6 fAYoC6tubW/xKdOhlL/N/MecEpfKQdVcUlY09cMH198+VAQUsjk081VeMwFzwOJ9xmeU guh8gN7FsVWY8VAgnpuBJKQurzLaal0jsRWdjxEQpeDHFvMPyMtKUpF/x/Iz/0NCrd1C WZIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774012978; x=1774617778; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GUDqodDk43yn3drXIlYhMhMKH+w2qm8q4A3+LPiJy1Y=; b=gwmshN07baaeZGCH1Q16xP3MlutTBu4Ofgfiv5hwCCSRgo3WMiKNqM0nNsW9YqrxUB o3BsH1MeGrNfXRYfShpg3UE/oyPWHGKQcrU/KvMvyMMODhaR5KjTJbb4CYPmV+VZqEmJ TB53V0ml3FAdn/TJ4J1Ar+K4+8jQEYIfhyxzaScQ/y+GfdSjzYDVHPs+EYHeTXGsksXl /0U2txSRGgyHHcHTyLgjKhIHjdJpP/LqD6yPqU19O6f++A/cZjBdTOT7lqNNXAIiUJE5 ACG1rSM235Kn5dN7B5gfdG5+8hLU5ITbDbBo6MEYaYisxFLxMdjFgsCDpjleihyJ1pAk sILA== X-Forwarded-Encrypted: i=1; AJvYcCUdln+nvaLnibWI7/PuierBEBqnoDKDDkj8WBOm5DuxLNaZzWO7ktqFo8M9f/AgTBNCrWJXoJfvNzJjOxs=@vger.kernel.org X-Gm-Message-State: AOJu0YyNMOd4qWNecaPGWbLvsCSCwTZXIouoUNAtRJhXGaE+3dEVJCAz L+YE3UXThUXKhbWFHki0TdRVK3AmDglubkQz6HYKCr3kif3ad092CFL06qtkWbHsMM6qfb0fI0z jtyOcwpp4Y4To8A== X-Received: from wmbdx7.prod.google.com ([2002:a05:600c:63c7:b0:47d:5bef:a379]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c167:b0:486:fab9:a578 with SMTP id 5b1f17b1804b1-486fedc3843mr45048705e9.11.1774012978000; Fri, 20 Mar 2026 06:22:58 -0700 (PDT) Date: Fri, 20 Mar 2026 13:22:57 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260319-gfp64-v1-0-2c73b8d42b7f@google.com> X-Mailer: aerc 0.21.0 Message-ID: Subject: Re: [PATCH 0/5] mm: Switch gfp_t to unsigned long From: Brendan Jackman 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 , , Content-Type: text/plain; charset="UTF-8" On Fri Mar 20, 2026 at 9:48 AM UTC, 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. Oh, but also couldn't we get those 3 back by expanding struct radix_tree_root as I suggested a few messages back: -#define radix_tree_root xarray +struct radix_tree_root { + struct xarray xarray; + gfp_t gfp; +}; That seems to make sense as a way to avoid the xa_flags overload even if gfp_t doesn't grow. (_If_ we can tolerate radix_tree_root expansion, which I have no idea about. Otherwise, yeah seems like finishing the radix-tree migration is a good path to more GFP flags).