mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: "Michał Cłapiński" <mclapinski@google.com>, dan.j.williams@intel.com
Cc: Mike Rapoport <rppt@kernel.org>, Ira Weiny <ira.weiny@intel.com>,
	"Dave Jiang" <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>, <jane.chu@oracle.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	"Tyler Hicks" <code@tyhicks.com>, <linux-kernel@vger.kernel.org>,
	<nvdimm@lists.linux.dev>
Subject: Re: [PATCH 1/1] nvdimm: allow exposing RAM carveouts as NVDIMM DIMM devices
Date: Mon, 12 Jan 2026 17:36:27 -0600	[thread overview]
Message-ID: <6965857b34958_f1ef61008b@iweiny-mobl.notmuch> (raw)
In-Reply-To: <CAAi7L5e0gNYO=+4iYq1a+wgJmuXs8C0d=721YuKUKsHzQC6Y0Q@mail.gmail.com>

Michał Cłapiński wrote:
> On Wed, Dec 17, 2025 at 4:14 AM <dan.j.williams@intel.com> wrote:
> >
> > Michał Cłapiński wrote:
> > [..]
> > > > Sure, then make it 1280K of label space. There's no practical limit in
> > > > the implementation.
> > >
> > > Hi Dan,
> > > I just had the time to try this out. So I modified the code to
> > > increase the label space to 2M and I was able to create the
> > > namespaces. It put the metadata in volatile memory.
> > >
> > > But the infoblocks are still within the namespaces, right? If I try to
> > > create a 3G namespace with alignment set to 1G, its actual usable size
> > > is 2G. So I can't divide the whole pmem into 1G devices with 1G
> > > alignment.
> >
> > Ugh, yes, I failed to predict that outcome.
> >
> > > If I modify the code to remove the infoblocks, the namespace mode
> > > won't be persistent, right? In my solution I get that information from
> > > the kernel command line, so I don't need the infoblocks.
> >
> > So, I dislike the command line option ABI expansion proposal enough to
> > invest some time to find an alternative. One observation is that the
> > label is able to indicate the namespace mode independent of an
> > info-block. The info-block is only really needed when deciding whether
> > and how much space to reserve to allocate 'struct page' metadata.
> >
> > -- 8< --
> > From 4f44cbb6e3bd4cac9481bdd4caf28975a4f1e471 Mon Sep 17 00:00:00 2001
> > From: Dan Williams <dan.j.williams@intel.com>
> > Date: Mon, 15 Dec 2025 17:10:04 -0800
> > Subject: [PATCH] nvdimm: Allow fsdax and devdax namespace modes without
> >  info-blocks
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> >
> > Michał reports that the new ramdax facility does not meet his needs which
> > is to carve large reservations of memory into multiple 1GB aligned
> > namespaces/volumes. While ramdax solves the problem of in-memory
> > description of the volume layout, the nvdimm "infoblocks" eat capacity and
> > destroy alignment properties.
> >
> > The infoblock serves 2 purposes, it indicates whether the namespace should
> > operate in fsdax or devdax mode, Michał needs this, and it optionally
> > reserves namespace capacity for storing 'struct page' metadata, Michał does
> > not need this. It turns out the mode information is already recorded in the
> > namespace label, and if no reservation is needed for 'struct page' metadata
> > then infoblock settings can just be hard coded.
> >
> > Introduce a new ND_REGION_VIRT_INFOBLOCK flag for ramdax to indicate that
> > all infoblocks be synthesized and not consume any capacity from the
> > namespace.
> >
> > With that ramdax can create a full sized namespace:
> >
> > $ ndctl create-namespace -r region0 -s 1G -a 1G -M mem
> > {
> >   "dev":"namespace0.0",
> >   "mode":"fsdax",
> >   "map":"mem",
> >   "size":"1024.00 MiB (1073.74 MB)",
> >   "uuid":"c48c4991-86af-4de1-8c7c-8919358df1f9",
> >   "sector_size":512,
> >   "align":1073741824,
> >   "blockdev":"pmem0"
> > }
> 
> Thank you for working on this.
> 
> I tried it an indeed it works with fsdax. It doesn't seem to work with
> devdax though.
> 
> $ ndctl create-namespace -v -r region1 -m devdax -a 1G -M mem -s 1G
> libndctl: ndctl_dax_enable: dax1.0: failed to enable
>   Error: namespace1.1: failed to enable
> 
> failed to create namespace: No such device or address
> 
> $ dmesg | grep dax
> [...]
> [   29.504763] dax_pmem dax1.0: could not reserve metadata
> [   29.504766] dax_pmem dax1.0: probe with driver dax_pmem failed with error -16
> [   29.506553] probe of dax1.0 returned 16 after 1815 usecs
> [...]
> 
> I think the dax_pmem driver needs to be modified too.

Michał

Did yall have a suggestion on how?  I lost track of this thread over the
holidays and so I'm not sure where this stands.

Ira

  reply	other threads:[~2026-01-12 23:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26  8:04 [PATCH 0/1] nvdimm: allow exposing RAM as libnvdimm DIMMs Mike Rapoport
2025-08-26  8:04 ` [PATCH 1/1] nvdimm: allow exposing RAM carveouts as NVDIMM DIMM devices Mike Rapoport
2025-08-29  0:47   ` Ira Weiny
2025-08-29  7:57     ` Mike Rapoport
2025-09-01 16:01       ` Michał Cłapiński
2025-09-02 15:35         ` Mike Rapoport
2025-09-24  1:16         ` dan.j.williams
2025-09-26 12:47           ` Michał Cłapiński
2025-09-26 18:45             ` dan.j.williams
2025-09-30 10:15               ` Mike Rapoport
2025-10-01 14:14               ` Michał Cłapiński
2025-10-01 22:28                 ` dan.j.williams
2025-12-09 20:10                   ` Michał Cłapiński
2025-12-17  3:14                     ` dan.j.williams
2025-12-29 16:39                       ` Michał Cłapiński
2026-01-12 23:36                         ` Ira Weiny [this message]
2026-01-13 12:39                           ` Michał Cłapiński
2026-01-14  2:34                             ` dan.j.williams
2025-09-24  1:08   ` dan.j.williams
2025-09-30 10:11     ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6965857b34958_f1ef61008b@iweiny-mobl.notmuch \
    --to=ira.weiny@intel.com \
    --cc=code@tyhicks.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mclapinski@google.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=rppt@kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®