From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 A5B093FF1D5 for ; Fri, 15 May 2026 15:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860325; cv=none; b=YFNdQOQ0O+772Mg72H2z0VtAZasbglQN9cOhYsw1awMvXXiJVPrYeHQQ0nh98m7Kma/oqEGbGEHzgDaoCw1QQ/Tqvoj1jSiQO0NhTjUceWv6Tm+TplQ41a52g7ajweGIlTTmAwCeYOUVFVV6Z5kCNb5QYU3SC2MbQ3uJeoAqeek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860325; c=relaxed/simple; bh=wyW3cRL+KIuZ1i+6Ogo2MQOzLNuu8DGW+0UKpVdB4xM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HNeoZrphDa+sMsmG7fJoe7ICCqfswyEL1Y0AH7PhOkFDj92GpARcOPoGcXNc2ocxPVC7lRXRRiaN/ALT3Qc6s2bYtyhDo8TTP89ai7de/Cn0SPGznrKzYCNKLPdxDTZHsq+DMUnTcHtOxLNZMaEw3hlLcHe8C8NYxBjKb0KRAeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=RebVDqTL; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="RebVDqTL" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-8c7154725easo40675536d6.0 for ; Fri, 15 May 2026 08:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1778860323; x=1779465123; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PYFOyMeTYplTKwOs2+O9r9ySgVaMin9+w0Ig6h6MeP8=; b=RebVDqTLGJIs9izSRUt8DhzWO1Hm32qSH/COdOkH75QzdFOHNTMB+ToE5S/URTE8aO kxT+xUIgPoaip0QqPg0CmfwVRzb8xEJNZd7ccbOkFagq5P74CsOj9RcDZHgVle/JgDK/ k6Xvmt+grAtwJ2NdUx8uMDREcQnP4/pmosNcoyOmF2WV9rHH6tMY1Vw/GsbX1JGNp/aq pvhmFkIWSTpK9HO2ygDlB/jOTsV6kpco93qDvmP61ri1FgkqSAWAht3f5O6b/CTcg5No aQG6QOHY+SI1DY43Khb1iNWNXFaL3Wxn7MCl/JdJks6IPnHOjsQjm13MmXI1Sld2XLHV xwXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778860323; x=1779465123; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYFOyMeTYplTKwOs2+O9r9ySgVaMin9+w0Ig6h6MeP8=; b=BWwaevAJU4phDmb6CEohF4KnSSzk+00mA034a79urGnICYU6bbtk55jl04KryFTUJe 0OG3sykOiSCYEBbuUcvjFmE/3krO59PVBb+po/owKLXjIHaKi9JatTNZym3XUmERrzTB XCrVPFvmSb5FZtRWUaZHk0DM9ToaIwGQk2Ahz9DFBqfXl5W1rzwVXGirIuuGBcWhKyBP 5GHdY/nQkLeWhAqnL6W5pxDBPR952GI1nAUcafX+bF+ebCfxxykgpysDufAOXTho7x8V nxvh5mL1NgfbQ66btqSDaZRZStqmtZPZCxRtpOBz2TnjkZKU8i8Sq/Bf6RYh0aKrhBOb PzYw== X-Forwarded-Encrypted: i=1; AFNElJ8cTwyFdV6pa1zl/t4srzNnRzPXVsKVC5bFMX8Enlu5plW3TFuE1RRTA4orawk2xU+iIafSg3IArjo9OIs=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5y4KoVNeQcV5vBKrZ4vsXSc6kdgDGlVyHrY5a9ElnivriK94n mvGNE3QYWFs3PrHbJvmboyd60nub2n5GqZ/johQz9B2A9E/9gPO3Y8Ks/KVvy31sHbI= X-Gm-Gg: Acq92OEOz9A8O/k5+W0lHDb4BgriqO1betSo6GV3iYeKUXel0dS3LZnNtFIc/czoGMk eformnqy3jY/egfJFoHLVxDPEjL1gngO7nLuqzRNrvkNZf9nZdY6eCrWmEn0Wram0uq64tKaix8 18/ihoFawO8YX8CDf29Jj4kaXKcadjjVzgGhiK+spWY83cqUZ22tWbde8vkdQAlDyNXwnXvsled l6X//WbD9gDVlN1clN/8Ax8WkQzOq/A6GHReBS/3GYWws3mL1/OrliUMf0zO27fP6JvM0Fq/70o Y2Pjyw9SYlt/MsSpeeR2VZ30apcCxsCvmTyTmFhwlEHdBRwyS/mO+jtkan8cZYKuE6c23FaC+tN JinExZDHSq1dRkmA59jWUVfjoDQD6XqIr3tDJURjcx8hbeJNE8jRUoB3AGQnWI7YO64RAZddoPq rJ5hadFLNKfiahO6Xl7mbAzaNQeUMh1Wj1NCkBHxp3JOYuqTAwrDqCpfSWuSAzWAnQBVjpvywl0 pSrpvXGdj9x X-Received: by 2002:a05:6214:5182:b0:8ca:1eb5:eaa3 with SMTP id 6a1803df08f44-8ca1eb5edb6mr9357586d6.27.1778860322577; Fri, 15 May 2026 08:52:02 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-100-36-248-188.washdc.fios.verizon.net. [100.36.248.188]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90b2dc4besm54238296d6.32.2026.05.15.08.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 08:52:02 -0700 (PDT) Date: Fri, 15 May 2026 11:52:00 -0400 From: Gregory Price To: Brendan Jackman Cc: "Vlastimil Babka (SUSE)" , Borislav Petkov , Dave Hansen , Peter Zijlstra , Andrew Morton , David Hildenbrand , Wei Xu , Johannes Weiner , Zi Yan , Lorenzo Stoakes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, rppt@kernel.org, Sumit Garg , derkling@google.com, reijiw@google.com, Will Deacon , rientjes@google.com, "Kalyazin, Nikita" , patrick.roy@linux.dev, "Itazuri, Takahiro" , Andy Lutomirski , David Kaplan , Thomas Gleixner , Yosry Ahmed Subject: Re: [PATCH v2 18/22] mm/page_alloc: introduce ALLOC_NOBLOCK Message-ID: References: <20260320-page_alloc-unmapped-v2-0-28bf1bd54f41@google.com> <20260320-page_alloc-unmapped-v2-18-28bf1bd54f41@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: On Fri, May 15, 2026 at 01:36:43PM +0000, Brendan Jackman wrote: > On Wed May 13, 2026 at 9:43 AM UTC, Vlastimil Babka (SUSE) wrote: > > > > Is it safe to just combine them? You come with ALLOC_WMARK_LOW and combine > > with ALLOC_WMARK_MIN from gfp_to_alloc_flags() but these are not bit flags, > > I think you end up with ALLOC_WMARK_LOW effectively. > > Ah, thanks, I do remember thinking about this and deciding that it was > safe but I probably just misunderstood the watermark code. > > This makes me a bit more attracted to the idea of a struct like Gregory > suggested in [1]. Then this could be captured in the type system. > This might actually be a good precursor before pulling alloc_context any further out. Since there's multiple paths into the lower layers with alloc_context, maybe there should already be a sanity check of the alloc flags anyway. ~Gregory