From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 143872DCC1C for ; Fri, 24 Jul 2026 13:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784898402; cv=none; b=Zt4piWdQUprcs0J/vf7XEMA7wMJnMmu0mryY+Av4989azCgFM+no++2VaXm1U/WtbKqHop8mUaHrLhKO7l66S1T/PlRI01YeQOYZdlKDog+1RTGv21X67hu8uJMzcZl/hF/1/7urochvM2sztw9FnAPBWEMyt5jnYx6HP6QZFdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784898402; c=relaxed/simple; bh=BO1Qo1nw+0PvCR2G2yHuB96lktg3Fj/o/8I/fLPhaLs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A820+S7Exik4Afsq2zZn/9D6tbVV3VDXk61WbePkzi52tfa6136b+qpBB/dG0Va6n5+07QRlIxn8x7vKFWLR6njXcSvo8IuqTFYTdPr1ByEmrqtySQUL5Tjnv1jZgdjA8Bp8Br+R7cWbIqfqMA1bMj1dbLTbqsOIoMKeND1EMz4= 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=owOCOzrs; arc=none smtp.client-ip=209.85.219.44 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="owOCOzrs" Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-8efcef23d21so3899906d6.2 for ; Fri, 24 Jul 2026 06:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1784898400; x=1785503200; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uClgs/33iOo+YM1fFExYaaz7O5yD2KHvC68r49braVw=; b=owOCOzrs8uY6A5RtywfAysDKXLFeRjf1meYDZH6XqhX9eUwK/JMdzMWsKzkVsaEIvd AfIcTjLmyUYnQe35AqxCdEGauL4CPCNNPdV9nPgERmJef4WbvH0DhYvbXCPInJnPLrYX dMp9FFfFTYlW99hUnozn+PZfuhK0t2ESilG/g1r5LLADVc2VIshJhYhi/0Jwt9Z9BIJA v0YhggNlAo/xHIwkZMAEbfthbBcY91+gHM+TIw5AyoaFPsk3yDOifG5LkSjD1nHmrYV8 YiGj2e+HNnMT/kxn9EmuAMpcYhxQIoRMrQAb12D8tI7Zu3sdmcQl79wzqcQ8jst1E/FD WXaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784898400; x=1785503200; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=uClgs/33iOo+YM1fFExYaaz7O5yD2KHvC68r49braVw=; b=JSll2NwPSd/AKNpxNI6Fy0Jf2SeBeaKlOyK+Jj5JkcUegqFEkw4bOXQ015GyYRqSS6 BkM8pUZF6uMG2P7UUzgtt9ruq/Tx6DaWd2SABqScwqXAD9XswFoR7rkhhm0nLohD1KCJ 5lZ4q52nVJCwQ8HgEhxbxRJIAG6NGdxHAANUiAOqoaRp2UmOf43RBtA/sVD74/oZhYbx mRwRUVWBvfx57uVJ+KHat+QqyZsCLpfGoBs6h/Ek/VxCooXpSSKHxdaDF8572ASkm/Bb vjMlz+v2okDTg8wFV0tTzvklYgsx+9CDWQc/2T9GP3wGB82pGor4RPSwzmaJWmqr5el6 zevA== X-Forwarded-Encrypted: i=1; AHgh+Rp12nr8dO2a8+cayHDAPFv+F9gSW7v2OFW0nZQSv9KbnJw0wGbNTgGN92bC8+tNZmFYTxtleFuDjeObiN8=@vger.kernel.org X-Gm-Message-State: AOJu0YxXMzBHr00wKdGrHNSUPmOj13ILm1aVU9zZ9tvAecpLIte7whjy xFXESwcVuHgDe99XVMpEIvbbK303d05BIAVkzN634FJg+dHIEF+/I4OnYeJMHpp12qxHmqIxbbW n0NGw X-Gm-Gg: AR+sD13j5a/SXair47FPqzgfGK2vrMIAjQ99R8eHFljfxabKKoVb7s8XPFDWNiuyTUy GfSA1VfytDH+srTh0tZbR8n/qahTO7TRLGI/9+xXAY17JN/ez7JHZxHo6K7v5RyJrKicAtlZUag ijMW61f0+zK5fYGhGxt5a989DLFM4VxIJ35n42FaaqXDLbeA74ZZyo4ucsmjY+sHAVmAgs0gau0 Ea+Ixq+EaKrERaGuD7eE9uikMPeE9iSqpq8pwiYPlyWimJI8FD6e/eZjgPPWDHnrYb22zMrN1fY y1tIsDoiBOu4DOtNphsvbQbRrqXa/4LwsaN5XeClsP1cGrTR8zu4bVSeeLYwvcT0nImX15lBBu9 11Qwy6F8DD9TeE27lVXxAOaqAUToQ9jUAutfVaMdhfI3BlSwwhl56hgJXDEZ4ZfZQc7KURA3U2I 7rpSVYDSsj5kcetWVIlZLiM5hLqTvOik6iQRL+IgDbTwm8R/TyrHRgq+tDejZ3RdvbIYWG X-Received: by 2002:a05:6214:ccb:b0:8dd:4979:4b19 with SMTP id 6a1803df08f44-907ca570d4dmr77408266d6.13.1784898399844; Fri, 24 Jul 2026 06:06:39 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-173-79-60-52.washdc.fios.verizon.net. [173.79.60.52]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907ba8b5f85sm68863316d6.2.2026.07.24.06.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 06:06:39 -0700 (PDT) Date: Fri, 24 Jul 2026 09:06:34 -0400 From: Gregory Price To: Richard Cheng Cc: linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-team@meta.com, djbw@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com, alison.schofield@intel.com Subject: Re: [RFC PATCH 0/8] dax/kmem: support for private NUMA nodes Message-ID: References: <20260722183519.935213-1-gourry@gourry.net> 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, Jul 24, 2026 at 03:45:23PM +0800, Richard Cheng wrote: > On Wed, Jul 22, 2026 at 02:35:11PM +0800, Gregory Price wrote: > > Hi Gregory, > > I have some thoughts especially for ownership and configs. > > I think it would be good to expose dax control of private node, just with > the following guarantees. > > Let's make it clear that userspace should never become the owner > of private node, they should be driver-owned and 1-to-1 mapping relationship. > The intent here is 100% 1-to-1 driver:node mappings. Technically there's nothing unreasonable about single-owner multi-node, but really we just don't want multiple devices on one node. > A userspace tool can request to reconfigure some capability of the DAX device, and > maybe how the driver expose it. > > A dax range may have several deployment rules, e.g. devdax, system-ram or private, with > the patch series' tool, it looks like a userspace tool can convert a DAX device between > dax and system-ram mode, I think that's unsafe especially when the region is online as > system-ram. > > And it will cause coherence issue to be resolved, if no special or strong use cases, I would > prevent having such ability to convert the rules in runtime, especially for fixed-purpose device. > Right now we can't really prevent a user from doing: echo dax0.0 > dax/drivers/devdax/unbind echo dax0.0 > dax/drivers/kmem/bind And in fact we depend on kmem being the default target for CXL to auto-probe through to hotplug. For CXL accelerators, the current intended auto-probe behavior is to terminate at an offline kmem dax binding, and then expect the user to either rebind the dax device, or rebind the entire cxl device: echo $DEVICE > ../drivers/cxl_pci/unbind echo $DEVICE > ../pci/my_cxl_device_driver/bind I have some old patches that augment how drivers select the dax mode, I can see about reviving that and maybe letting the source driver also dictate which dax modes are valid according to the source. I'll look into that. > For capability bitmap part, I think it's reasonable to expose it, but with 2 concepts > - supported_caps : immutable, supplied by the provider/vendor > - enabled-caps : selected policy, subset of supported_caps > > The invariant should always hold > """ > enabled_caps & ~supported_caps == 0 > """ > > This way we can prevent userspace from touching things that they shouldn't. > This I like, and i think you've convinced me that this should be a separate dax device driver so we're not overloading kmem. That said, for a dax device that was not created by a driver, but instead created via something like "memmap=" boot parameter, i'm we can't really dictate supported caps - but for a driver that *does* want to limit support, I think we can manage that. > Maybe a demo with a driver would be nice ? > Sure! I think i'm going to include my anon-memory only compressed ram service back into v6 w/ the dax driver extensions you've suggested. ~Gregory