From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795421220; b=IuxXf9Ck9QvmnzaaJ30CGpNxadC/rNBS5CLidgbfQpSqnyWbFmiJH59Yqv5zyXys+8vR yViUur+RogLFaAikY+sk0zT6joikqjgJd/tZZizdM3kcSqjJgYmTgmftw55FAEpo4DrR4 C7rmcrqSa78GVbdMwMh8D+gEEL2xihxnJCnc1qwvLhQhuPrAcEr/bUICssS02aRHqG9Hi zkaivJpq0G7PxvHyGqGMbkkuwA4NudRA79xYCXKZSMV2I/2Eynfzmct0ynsF/JDzyQZxr w2vLcmjC7w/qWFuboh9ezLaSSY0ZHtBJLhoVPsRk4PM6Oewvq3yW01ZIh/gEHSaX8VA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795421220; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:From:To: Cc:In-Reply-To:References:Date:Message-Id:X-Mailer; bh=GdWbto/GYuZDXyTvm+7T3nEGrjgUlN0uIoNMYNUd3jo=; b=5Di0Pewb6+DYv3aZVcFO4hWPVN6AJ0xH55jxmyFdgfninCQv9Ve9oNOGde82HVEjUZNh hCYchdaJBGpUm+eXWhVfSo/Xegpa7QTlle08LGrHA/iGdwYYxXdURdflSJxz7CsJpS61l oZ0xYMbBsmGfJSR5BP3QCP/xLwgoT3srTeI9P3Ts8naoX4nod9hGg7ANTNJ51U6cKBaUR UFfxa5WYh8AwCa9J2T4qHZvpQTH09kTFr/dvi6duN7oKeoMtsnaPS3hyEoZLqLtvfe8Be d7ReFEU1tXXJ7IFI+KirTeSDzIIeWRl2qAKxL8n6mh7rn/HGCMIaMo+Rg2Xt3F/Iz1A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass header.d=gourry.net header.i=@gourry.net header.a=rsa-sha256 header.s=google header.b=UbEDloij; arc=none smtp.remote-ip=209.85.222.179 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EC6B6071512 for ; Mon, 23 Nov 2026 08:06:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4EC6B6071512 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.a=rsa-sha256 header.s=google header.b=UbEDloij Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-93a40a9a01aso502447085a.0 for ; Mon, 23 Nov 2026 00:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1795421218; x=1796026018; darn=vger.kernel.org; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:content-type:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=GdWbto/GYuZDXyTvm+7T3nEGrjgUlN0uIoNMYNUd3jo=; b=UbEDloij11O9wu6jNn+7P7+RZvZz4DV6AR9vzS0fBzrCehXkVi8FOnGNXNLIlq3OFN rCOsnG3X3QGQiYNFwNBZQvVWlmIntqs5/WJfYWYXfHntN863rJIHHZTTX2sLk9DadYAh X7mwrYku1mJRpu7QCeTz76l1LWFiNv9wX+8lJ+dyFLhh7T7coDHq+YmCQpQmF0KSfLAE 9axnyb0s2etYFlHigdYQlixa19gpIFF4IlLkDUP/DJBpH2LsHFTuoxzst9SFQAkBwo3W CxDF/n/80StXZi/eyfYksm+TAH6RyPX3cmBYA54kpqV7TFm36nQo/8FDZjHvtxTROyuE REoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795421218; x=1796026018; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:content-type:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GdWbto/GYuZDXyTvm+7T3nEGrjgUlN0uIoNMYNUd3jo=; b=VaGh9l0o5kLyAec0BlL2DHQRgQ+qOjnPFAQ6X6x37X3MH3KYZHwTHNPWoBOw2z+g9R +U8TRMyAOnAC7nJdZYjkp1AGCjhHv0UnFoGOFLAmwKinaDQGaZlklGbOP4EYJHSsO9t+ Uz8zJGfMOKMdb4MFYa6UpaTiHFRewC35WRIH8y6ZyUnYbxVl/1hQM4SgJ+TYOkEc/7LH N21I4FdRy+THD4mvBoPjJCfFudyMbj6pqpG3liuM/UkkM50zRIgbIoFv4uB2By6euQm2 W3qTt4x4QJuz4M/pPxdgJekuBu9qaAJ9udubmp74CwvR/I0dDMncwkOD3GJTU6SJ/VVR EV/g== X-Forwarded-Encrypted: i=1; AL+hErESSntO1pPVVLCuyG7HtVEZV3FRWThQrVAnYY6a8g4sDGN+zO4VbPwBIbmT7PjSUl+Yjry3DBuZ7LiF+D4=@vger.kernel.org X-Gm-Message-State: APuU4Z9atdPMi8LkYdLKDzo2lAl79sllp0ADnr4qrm6zUq2FMeY/tPMS rg2RUdq2lYgOzGdr6xj9MUrplj7qA5SVyqMqGgR9VyFs7mx3+06n0lAwq5Gcs2EQ830= X-Gm-Gg: AZFdTZeePJr9nfPJFHKLT8FLCarTOYBjpYqv3wLVxrsYl4usF6laeTS0NCeUYWux7B/ Kab5qNaNSzcQnmjvjFEQZUaqJ6SFjLV68yrxLdJr6ATiMbYBWDliee0HKQ25EUUWvxmVTRw0SPV 4AQbu7bjRum3caHigQTO5QeAVWf/W0rruxQhwgVuA4cJa8A+7n8OvrFfImz6jNK6artOXFsqLtH CMNeaRNxRRiG2YQ89ejwI66QWahvy+9gktsNAbO8BiPklp577205jXjtsMtwtadZ8S4G103tf0B 3HqhrP/Yj8l2PLWYAx882zeBqUY6AfdJGY5pkfmV86kHfU3Xm0XkEY4kUy/rn8cICx7aCFBrdck 7gEPoqsgL48vZUu7YRjEWBGB9hJp8Bo1nEh2Bdq/0LFUrbVfWG+PxJjI6d49fg3Aj2g70T4VAKk CBKxqYiJqb64A4nJq7xc9SCsq0g0KtQc29gBWuvKnnemDUjkWYq0u6bV1Ash2rTUYCVLZyqQ6sR 2oh50ETaFKFdDtqHbb5xADEFzJq5qG2pDD9KxEFzIUXEGvGvm65K8nPSuKYpDaOWVeniZxulkgH Uaat1h/4/3C5aPbJxTdqivi1yB+c1dxRbicvg5KWwcWjkvpjHKLsnRpE5ptSKmneY4jViwks3cQ r2uNdHr1HeE37UjkhRO+VqKA8brL+ X-Received: by 2002:a05:620a:4481:b0:93f:2571:bb6d with SMTP id af79cd13be357-949bab32ff9mr1727268685a.39.1795421218145; Mon, 23 Nov 2026 00:06:58 -0800 (PST) Received: from [192.168.50.231] (pool-71-191-145-202.washdc.fios.verizon.net. [71.191.145.202]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb349db3sm745619285a.7.2026.11.23.00.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2026 00:06:57 -0800 (PST) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 00/60] Private NUMA nodes From: "Gregory Price (Meta)" To: Yury Norov Cc: "Gregory Price (Meta)" , Yury Norov , Rasmus Villemoes , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Michal Hocko , Andrew Morton , Oscar Salvador , Johannes Weiner , Suren Baghdasaryan , Brendan Jackman , Zi Yan , Jonathan Corbet , Shuah Khan , Randy Dunlap , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Johan Hovold , Joshua Hahn , Rakie Kim , Ying Huang , Matthew Brost , Byungchul Park , Alistair Popple , SJ Park , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Kees Cook , Kairui Song , Barry Song , Qi Zheng , Shakeel Butt , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Baolin Wang , Michal Hocko , David Rientjes , Pavel Machek , Len Brown , Nico Pache , Ryan Roberts , Dev Jain , Lance Yang , Usama Arif , Kiryl Shutsemau , Xu Xin , Chengming Zhou , Lorenzo Stoakes , Pedro Falcato , Jann Horn , Chris Li , Kemeng Shi , Nhat Pham , Youngjun Park , "Matthew Wilcox (Oracle)" , Jan Kara , Waiman Long , Ridong Chen , Tejun Heo , =?utf-8?q?Michal_Koutn=C3=BD?= , Dan Williams , Vishal Verma , Dave Jiang , Alison Schofield , Shuah Khan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, driver-core@lists.linux.dev, damon@lists.linux.dev, linux-pm@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, nvdimm@lists.linux.dev, linux-kselftest@vger.kernel.org In-Reply-To: References: <20261120-private_nodes_v6-v1-0-74f5f9a115c2@gourry.net> <179537469194.412063.13456998694958645706.b4-reply@b4> Date: Mon, 23 Nov 2026 03:06:55 -0500 Message-Id: <179542121527.412063.3452837736734095837.b4-reply@b4> X-Mailer: b4 0.17-dev On 2026-11-22 16:12 -0500, Yury Norov wrote: > On Sun, Nov 22, 2026 at 02:11:31PM -0500, Gregory Price (Meta) wrote: > > On 2026-11-22 11:51 -0500, Yury Norov wrote: > > > On Fri, Nov 20, 2026 at 01:08:51PM -0500, Gregory Price via B4 Relay wrote: > > > > This is v6 of the Private NUMA node series. The series falls into four > > > > parts, each building on the one before: > > > > > > > > 1-18 mm: introduce N_MEMORY_COMMON > > > > > > I walked through this part, mostly. It looks like you can substantially > > > decrease the patch count if you keep N_MEMORY meaning unchanged, and > > > add another type, like N_MEMORY_NOALLOC. > > > > > > > I don't see how this would reduce the patch count substatially, you > > still need to convert existing N_MEMORY users and need to differentiate > > between general purpose memory nodes and private memory nodes. > > Please check this quick attempt with my codex. The patch count is reduced > to 52: > > https://github.com/norov/linux/tree/private-nodes-v6-n-memory-folded > ... snip ... Patch count is not what we want to be optimizing for here. Your branch carries the same code (+3 lines net actually). The patch reduction comes from squashing the per-subsystem conversions into one 16-file commit. It also broke get_mempolicy(MPOL_F_MEMS_ALLOWED) - it now returns memoryless nodes even if the system doesn't have a private node. > The more important thing is that N_MEMORY and the proposed N_MEMORY_NOALLOC > is a disjoint, contrary to N_MEMORY and N_MEMORY_COMMON. The proposal here is not novel - version 5 was also disjoint: https://lore.kernel.org/linux-mm/20260720193431.3841992-5-gourry@gourry.net/ N_MEMORY and N_MEMORY_PRIVATE are mutually exclusive states. I moved away from that because it changes the definition of N_MEMORY. The subset model is easy to understand N_MEMORY - a node has memory -> N_HIGH_MEMORY - subset of N_MEMORY -> N_NORMAL_MEMORY - subset of N_MEMORY -> N_MEMORY_COMMON - subset of N_MEMORY -> N_MEMORY_PRIVATE - subset of N_MEMORY (COMMON and PRIVATE partition N_MEMORY) -> N_MEMORY_ - subset of N_MEMORY all N_MEMORY_COMMON some N_MEMORY_PRIVATE It's additive. Users pick the set of nodes they want for their purpose and don't have to cobble sets together or remember special helpers. Users don't even need to know about private nodes most of the time (mempolicy being the one major exception here). In the disjoint model, N_MEMORY no longer means "has memory". Recovering that set requires new helpers, and the meaning changes silently for every in-tree and out-of-tree user. Anything that wanted "has memory" quietly misses private nodes. Either way you have to audit each N_MEMORY reference and decide whether it wants that state or a feature variant (N_MEMORY_RECLAIM, COMPACTION). The difference is how a missed site fails. In the joint model the zonelist and the common-memory folio checks backstop allocation and access, so a missed placement site costs some additional work. In the disjoint model a missed site silently drops a node from stats and accounting - or worse fails to allocate per-node meta data. So no, I do not think we should go back to the disjoint model. > > And N_MEMORY_NOALLOC is not a good name. > > Sure, I'm not attached to any particular name. Although, > N_MEMORY_COMMON nothing better to me. It answers the question > 'what for this thing' even worse. > happy to wordsmith the names here. N_MEMORY_GENERAL? _DEFAULT? _COMMON felt intuitive but I am happy to rename it whatever. -- ~Gregory