nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* ndctl create-namespace region order
@ 2018-07-27 21:30 Elliott, Robert (Persistent Memory)
  0 siblings, 0 replies; only message in thread
From: Elliott, Robert (Persistent Memory) @ 2018-07-27 21:30 UTC (permalink / raw)
  To: 'Dave Jiang', dan.j.williams, 'Verma, Vishal L'
  Cc: linux-nvdimm

ndctl create-namespace doesn't walk through the regions
from lowest to highest; in this example it's going
1,3,5,0,2,4,6:

$ sudo ndctl create-namespace --verbose
ROB: parsing bus id=0 path=ndbus0
ROB: parsing region id=1 path=region1
namespace_create:770: region1: insufficient capacity size: 0 avail: 0
ROB: parsing region id=3 path=region3
namespace_create:770: region3: insufficient capacity size: 0 avail: 0
ROB: parsing region id=5 path=region5
namespace_create:770: region5: insufficient capacity size: 0 avail: 0
ROB: parsing region id=0 path=region0
namespace_create:770: region0: insufficient capacity size: 0 avail: 0
ROB: parsing region id=2 path=region2

That makes the results unpredictable.

That's from do_xaction_namespace():

        ndctl_bus_foreach(ctx, bus) {
printf("ROB: parsing bus id=%d path=%s\n", ndctl_bus_get_id(bus), ndctl_bus_get_devname(bus));
                if (!util_bus_filter(bus, param.bus))
                        continue;

                ndctl_region_foreach(bus, region) {
printf("ROB: parsing region id=%d path=%s\n", ndctl_region_get_id(region), ndctl_region_get_devname(region));
                        if (!util_region_filter(region, param.region))

The same order is used for other commands like
disable-namespace and destroy-namespace.

Questions
=========
1. Could the busses and regions (anything accessed with
a _foreach() macro) be sorted in ascending order so this
and other commands are more predictable?

2. For create-namespace with no region arguments, rather than
just creating one random namespace, how about creating namespaces
on each available region?

3. The manpage suggests that "-r all" does that, but it seems to 
just make every region number pass the filter in that foreach
loop (i.e., it has no effect for the create-namespace command,
which just creates one and quits).

---
Robert Elliott, HPE Persistent Memory

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-27 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 21:30 ndctl create-namespace region order Elliott, Robert (Persistent Memory)

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