From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 2E5B8376BE3 for ; Mon, 12 Jan 2026 17:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239412; cv=none; b=AM0DLq3LF9wDmhTF+YpHrsfwNr/ThXG1J6DPPxVju6o76phdD58vfgbJPI8WZcQDVhSX/s0a35UsNu5j4NqvQEMZ/jQct/7BH+M3StMbo/6TlAfDOZM49WGq1y997Wya+rScMqzOaJ7MIlAQyvOLX/eB8UZCHzPgY4U7hYERsbk= 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.170 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-f170.google.com with SMTP id d75a77b69052e-4f1b4bb40aaso35825911cf.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=FLk5f2WtvqEknGyTXiAmSXyDereRd/T0ULJM2Jw5MLQbnOtKDmlPZSV1MvBtBU9p3J OLz7w+xkHBoSmN8tK7wNbaLcD/VLmA4v9dQ0i8pRSLLu4CjpXG2leu4KDKUE2zTQFWyM wzukhL2PAulJrbIJPHnHFS97qZTfWoUDX1IQnn94/dyYGG3RPDSZ9r+r1y/plUKDHceP cSz+PzUQ93o7E2HOdW2lEOx/JWGUABbA3CRR0dgbxMLDtTy8HDfa3JtOeD7EJAONeSPk iAPnzPW10r8+IP2zIYVWp7m2ZrryPo1U+adJ18hPxTo4Sx5+ziJeh4/XLU/oYDQt6Swz Y6Fg== X-Forwarded-Encrypted: i=1; AJvYcCUaxP9Q6ysnxDfVp9Gw4w0bBHXdVQCwMcwG/9sNSqC/9xvH/hzW5kl/JERgjb9XWgNfO1K11iBtXIg=@vger.kernel.org X-Gm-Message-State: AOJu0YzIk3iSUrC5yP1+TaxHh7mmellNr3o1oeclcB53JeGOAiDjHCu1 pfQkvBzl1HRxR3K6upwEJI/JYYpeeNR8blNHwSnQvqat+BV4gigbB097p3Mze0OrqHM= X-Gm-Gg: AY/fxX6epwdgXXj+rv0cjGjctXmCz/qOMDFX6IMNiD8cFZ2TA/lQqlL619DVi15qgr7 hC2ufWz2CWlKs5lw4v0RsBqtQn28wnkbB2jR7h41P37LpQEOUNm0/SNyBu5uhBW5y0CKkkuJqE/ v8O7GCBABk0nw8Q5uhhkpc4wAiffNQ7j9SoAEy/8XR/E5IhFPkHIzieBxLqhqqB5rdaLhV8jcJd MITJ57Jwuu5yTXcnlX+CPguQ1b38+QkYVcGetNNsqJq+PffvJ+IoHXrLDmUFPuHv5gMIzzf3opG oH15WlCXaMsE92oQhFVG3cgMXAN3VZPYCjVLtpUikgfFvGFxn8oMkeeDN6Xf2lkhn9eSOXa4RaE jVicL8ldDAEKco08b9wYxIrHbnJGjERV03E8wQGKysCHPKTPsAsMDc3DXO4B7Gc6MjGgFncYhRs ryQKc/8iO6RBxb7P2RL25Q66zIhXdAImCcGPl0O0a/D73V+tOB4goi5fRqtQzIi8fXKRSSGA== X-Google-Smtp-Source: AGHT+IFIkZj0kkQefVdB6/+qxt7dAorkKD4y+wc4fxceCP23QaEoHwxiHll6IFZYaJtBeI5hcZkdtA== X-Received: by 2002:a05:622a:1b8c:b0: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-doc@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