Re: [PATCH 1/1] nvdimm: allow exposing RAM carveouts as NVDIMM DIMM devices

From: dan.j.williams
Date: Tue Dec 16 2025 - 22:15:04 EST


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< --