From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 2D71237416A for ; Mon, 12 Jan 2026 17:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239412; cv=none; b=dvMzV/Ei6s0FY+8VFNvopmeyzjatKzquNzaPo3H0EzLhDly7GKmj8A00Nu3NOZxOjxVvHcc05sag7LgR9U265EdiKpSz01yFnLbbNXFwx5T/hb+NV+iKqvAjHu9gS2y0I6ia4RIVY0GD58NyDx6B15DDOoNBBB6p4SWNs5WUkoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239412; c=relaxed/simple; bh=QzyYc3RXX8zVo3g9H6ehLJVIhE0FG7hrH0ndqq+y8qg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jJ7rXItJWz3vWJ0fK7BVS5OUAKNplsA3Sua0WWaFgqZ4gUUy0WO9FtzDhdIiIaT3qFY+92OboaAME2I26pz2q/hsBRV9hs6D7YGCGfl/abJKQgrOZ2CdmQkzOxMBDg0msmITowcKIiKYwzRf9NGI/oqjTALD1ZnwPY1MkbgBbzo= 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=hSSKPtJp; arc=none smtp.client-ip=209.85.160.171 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="hSSKPtJp" Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-4f1b4bb40aaso35825951cf.3 for ; Mon, 12 Jan 2026 09:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1768239410; x=1768844210; 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=iIrzuD3V8mK4XZdD49Fp4+4pZSOoDd5AA8lqEVpgoJQ=; b=hSSKPtJpm9XKpKmlVkiF9I0Ekq5ZXgr3bjDAtmrluR0I3ebjJAnobvxmSHzbqhiGvU qYWTXJnsUHCT+s44nF6TPX4gCMPtgGLF2ZlwUKnIOnQHdpYFkhEAmCdSjeaqTswY3n3a RkVuDw0e/47RJTRSsNdkURc17KTDpzO9XL5SWbPGsjb0HiDv2pJs32VIes/uCq4M2awm SbqLYEJ/ns/jzCoXpjcgev9zUZIDfqM9+eICIyCPDJj0RF7TiIk1cLHpZLJr/RKg7Wjq Q1P5HJyLDXi6n8stxt/1HBWzdgKUNIrxAk5tBZZs2mcvhw7jnMJYzPoX7DqqKMpgrJ+j ttXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768239410; x=1768844210; 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=iIrzuD3V8mK4XZdD49Fp4+4pZSOoDd5AA8lqEVpgoJQ=; b=scqZgi1oUdnehdAWN1EeMGJMw+ZYmavqcEi5aI2MdH7BxIadBFZoGLdeKuukSpdUys HP/8vzFJ/HkTWq+sjFsbzW1RORsU26p0vpwDSzcWytqXJtfhbZfpmK1ZfUo5sgo7+dfG z160oJDvs9KblV2OPknnWDEljjyT4z6EXhPDZne8996Z3xA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4ec:f6d5:ee46 with SMTP id d75a77b69052e-4ffb4af497fmr238029601cf.78.1768239410022; Mon, 12 Jan 2026 09:36:50 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4ffa8d39230sm131000681cf.6.2026.01.12.09.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jan 2026 09:36:49 -0800 (PST) Date: Mon, 12 Jan 2026 12:36:15 -0500 From: Gregory Price To: Yury Norov Cc: Balbir Singh , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@meta.com, longman@redhat.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, corbet@lwn.net, gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org, dave@stgolabs.net, jonathan.cameron@huawei.com, dave.jiang@intel.com, alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, dan.j.williams@intel.com, akpm@linux-foundation.org, vbabka@suse.cz, surenb@google.com, mhocko@suse.com, jackmanb@google.com, ziy@nvidia.com, david@kernel.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, rppt@kernel.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, yury.norov@gmail.com, linux@rasmusvillemoes.dk, rientjes@google.com, shakeel.butt@linux.dev, chrisl@kernel.org, kasong@tencent.com, shikemeng@huaweicloud.com, nphamcs@gmail.com, bhe@redhat.com, baohua@kernel.org, yosry.ahmed@linux.dev, chengming.zhou@linux.dev, roman.gushchin@linux.dev, muchun.song@linux.dev, osalvador@suse.de, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, ying.huang@linux.alibaba.com, apopple@nvidia.com, cl@gentwo.org, harry.yoo@oracle.com, zhengqi.arch@bytedance.com Subject: Re: [RFC PATCH v3 0/8] mm,numa: N_PRIVATE node isolation for device-managed memory Message-ID: References: <20260108203755.1163107-1-gourry@gourry.net> <6604d787-1744-4acf-80c0-e428fee1677e@nvidia.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 Mon, Jan 12, 2026 at 12:18:40PM -0500, Yury Norov wrote: > On Mon, Jan 12, 2026 at 09:36:49AM -0500, Gregory Price wrote: > > > > Dan Williams convinced me to go with N_PRIVATE, but this is really a > > bikeshed topic > > No it's not. To me (OK, an almost random reader in this discussion), > N_PRIVATE is a pretty confusing name. It doesn't answer the question: > private what? N_PRIVATE_MEMORY is better in that department, isn't? > > But taking into account isolcpus, maybe N_ISOLMEM? > > > - we could call it N_BOBERT until we find consensus. > > Please give it the right name well describing the scope and purpose of > the new restriction policy before moving forward. > "The right name" is a matter of opinion, of which there will be many. It's been through 3 naming cycles already: Protected -> SPM -> Private It'll probably go through 3 more. I originally named v3 N_PRIVATE_MEMORY, but Dan convinced me to drop to N_PRIVATE. We can always %s/N_PRIVATE/N_PRIVATE_MEMORY. > > > > enum private_memtype { > > > > NODE_MEM_NOTYPE, /* No type assigned (invalid state) */ > > > > NODE_MEM_ZSWAP, /* Swap compression target */ > > > > NODE_MEM_COMPRESSED, /* General compressed RAM */ > > > > NODE_MEM_ACCELERATOR, /* Accelerator-attached memory */ > > > > NODE_MEM_DEMOTE_ONLY, /* Memory-tier demotion target only */ > > > > NODE_MAX_MEMTYPE, > > > > }; > > > > > > > > These types serve as policy hints for subsystems: > > > > > > > > > > Do these nodes have fallback(s)? Are these nodes prone to OOM when memory is exhausted > > > in one class of N_PRIVATE node(s)? > > > > > > > Right now, these nodes do not have fallbacks, and even if they did the > > use of __GFP_THISNODE would prevent this. That's intended. > > > > In theory you could have nodes of similar types fall back to each other, > > but that feels like increased complexity for questionable value. The > > service requested __GFP_THISNODE should be aware that it needs to manage > > fallback. > > Yeah, and most GFP_THISNODE users also pass GFP_NOWARN, which makes it > looking more like an emergency feature. Maybe add a symmetric GFP_PRIVATE > flag that would allow for more flexibility, and highlight the intention > better? > I originally added __GFP_SPM_NODE (v2 - equivalient to your suggestion) and it was requested I try to use __GFP_THISNODE at LPC 2025 in December. v3 makes this attempt. This is good feedback to suggest maybe that's not the best and maybe we should keep __GFP_SPM_NODE -> __GFP_PRIVATE > > > What about page cache allocation form these nodes? Since default allocations > > > never use them, a file system would need to do additional work to allocate > > > on them, if there was ever a desire to use them. > > > > Yes, in-fact that is the intent. Anything requesting memory from these > > nodes would need to be aware of how to manage them. > > > > Similar to ZONE_DEVICE memory - which is wholly unmanaged by the page > > This is quite opposite to what you are saying in the motivation > section: > > Several emerging memory technologies require kernel memory management > services but should not be used for general allocations > > So, is it completely unmanaged node, or only general allocation isolated? > Sorry, that wording is definitely confusing. I should have said "can make use of kernel memory management services". It's an unmanaged node from the perspecting of any existing user (no existing core service user is exposed to this memory). But this really means that it's general-allocation-isolated. ZONE_DEVICE is an unmanaged zone on a node, while this memory would be onlined in ZONE_MOVABLE or below (i.e. it otherwise looks like normal memory, just it can't be allocated). In theory, we could re-use ZONE_DEVICE for this, but that's probably a few more RFCs away. I'm still trying to refine the language around this, thanks for pointing this out. ~Gregory