nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* ND_MIN_NAMESPACE_SIZE
       [not found] <1158028069.2624087.1498868468565.ref@mail.yahoo.com>
@ 2017-07-01  0:21 ` Soccer Liu
  2017-07-01  1:53   ` ND_MIN_NAMESPACE_SIZE Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Soccer Liu @ 2017-07-01  0:21 UTC (permalink / raw)
  To: Linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw

 Hi all:
 I noticed that ND_MIN_NAMESPACE_SIZE is defined as 4MB.
nvdimm_namespace_common_probe(..){..
   if (size < ND_MIN_NAMESPACE_SIZE) {
 dev_dbg(&ndns->dev, "%pa, too small must be at least %#x\n",
 &size, ND_MIN_NAMESPACE_SIZE);
 return ERR_PTR(-ENODEV);
 }...}
In our configuration, we have a host based software enumerated PMEM device that could be much smaller than 4MB.Because of above failure, no PMEM device was exposed.
I changed ND_MIN_NAMESPACE_SIZE to smaller size (such as 256 KB) and a smaller size (<4MB) Persistent Memory starts working.Is there any reason that it cannot be smaller?
Thanks
Cheng-mean
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ND_MIN_NAMESPACE_SIZE
  2017-07-01  0:21 ` ND_MIN_NAMESPACE_SIZE Soccer Liu
@ 2017-07-01  1:53   ` Dan Williams
       [not found]     ` <CAPcyv4hiWY-6Bdf=U1QR+bCVvPy8Fq+eaL0+-qzLvbpcEuwn4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2017-07-01  1:53 UTC (permalink / raw)
  To: Soccer Liu; +Cc: Linux-nvdimm

4M was picked as the smallest "reasonable" size for a disk. We could
make it smaller, but what is the use case?

On Fri, Jun 30, 2017 at 5:21 PM, Soccer Liu <soccer_liu@yahoo.com> wrote:
>  Hi all:
>  I noticed that ND_MIN_NAMESPACE_SIZE is defined as 4MB.
> nvdimm_namespace_common_probe(..){..
>    if (size < ND_MIN_NAMESPACE_SIZE) {
>  dev_dbg(&ndns->dev, "%pa, too small must be at least %#x\n",
>  &size, ND_MIN_NAMESPACE_SIZE);
>  return ERR_PTR(-ENODEV);
>  }...}
> In our configuration, we have a host based software enumerated PMEM device that could be much smaller than 4MB.Because of above failure, no PMEM device was exposed.
> I changed ND_MIN_NAMESPACE_SIZE to smaller size (such as 256 KB) and a smaller size (<4MB) Persistent Memory starts working.Is there any reason that it cannot be smaller?
> Thanks
> Cheng-mean
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ND_MIN_NAMESPACE_SIZE
       [not found]     ` <CAPcyv4hiWY-6Bdf=U1QR+bCVvPy8Fq+eaL0+-qzLvbpcEuwn4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-07-01 19:08       ` Socer Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Socer Liu @ 2017-07-01 19:08 UTC (permalink / raw)
  To: Dan Williams; +Cc: Linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw

Here is our usage case:

We are trying to represent each Docker container image layer in a read-only persist memory device before injecting into a guest Linux VM for constructing a union file system as part of the container execution preparation task.
 Those read-only persistent memory devices are RAM emulated, not the real PMEM devices. Their sizes are very flexible. On top of that, the sizes of those docker layers could be well below 4MB. Looking at the nvdimm code, NV_MIN_NAMESPACE does not seem to be used in any other context other than the initial size checking. So I built a private kernel with a redefined NV_MIN_NAMESPACE_SIZE to much smaller number, such 64kb, and the persistent memory devices for smaller layers start functioning as expected.


Thanks 
Cheng-mean




> On Jun 30, 2017, at 6:53 PM, Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> 
> 4M was picked as the smallest "reasonable" size for a disk. We could
> make it smaller, but what is the use case?
> 
>> On Fri, Jun 30, 2017 at 5:21 PM, Soccer Liu <soccer_liu-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:
>> Hi all:
>> I noticed that ND_MIN_NAMESPACE_SIZE is defined as 4MB.
>> nvdimm_namespace_common_probe(..){..
>>   if (size < ND_MIN_NAMESPACE_SIZE) {
>> dev_dbg(&ndns->dev, "%pa, too small must be at least %#x\n",
>> &size, ND_MIN_NAMESPACE_SIZE);
>> return ERR_PTR(-ENODEV);
>> }...}
>> In our configuration, we have a host based software enumerated PMEM device that could be much smaller than 4MB.Because of above failure, no PMEM device was exposed.
>> I changed ND_MIN_NAMESPACE_SIZE to smaller size (such as 256 KB) and a smaller size (<4MB) Persistent Memory starts working.Is there any reason that it cannot be smaller?
>> Thanks
>> Cheng-mean
>> _______________________________________________
>> Linux-nvdimm mailing list
>> Linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org
>> https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ND_MIN_NAMESPACE_SIZE
       [not found] <712061588.2013689.1498808004641.ref@mail.yahoo.com>
@ 2017-06-30  7:33 ` Soccer Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Soccer Liu @ 2017-06-30  7:33 UTC (permalink / raw)
  To: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw

Hi all:
 I noticed that ND_MIN_NAMESPACE_SIZE is defined as 4MB.
nvdimm_namespace_common_probe(..){..
   if (size < ND_MIN_NAMESPACE_SIZE) {
 dev_dbg(&ndns->dev, "%pa, too small must be at least %#x\n",
 &size, ND_MIN_NAMESPACE_SIZE);
 return ERR_PTR(-ENODEV);
 }...}
In our configuration, we have a host based software enumerated PMEM device that could be much smaller than 4MB.Because of above failure, no PMEM device was exposed.
Is there any reason that it cannot be smaller?
ThanksCheng-mean


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-01 19:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1158028069.2624087.1498868468565.ref@mail.yahoo.com>
2017-07-01  0:21 ` ND_MIN_NAMESPACE_SIZE Soccer Liu
2017-07-01  1:53   ` ND_MIN_NAMESPACE_SIZE Dan Williams
     [not found]     ` <CAPcyv4hiWY-6Bdf=U1QR+bCVvPy8Fq+eaL0+-qzLvbpcEuwn4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-01 19:08       ` ND_MIN_NAMESPACE_SIZE Socer Liu
     [not found] <712061588.2013689.1498808004641.ref@mail.yahoo.com>
2017-06-30  7:33 ` ND_MIN_NAMESPACE_SIZE Soccer Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).