Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 05:06:10PM -0400, Jeff Moyer wrote: > Ira Weiny writes: > > > On Fri, Oct 18, 2019 at 04:23:01PM -0400, Jeff Moyer wrote: > >> The 'done' variable only adds confusion. > >> > >>goto out; > >>} > >> - } while (!done); > >> + } while

Re: [ndctl PATCH 10/10] daxctl: add --no-movable option for onlining memory

2019-10-18 Thread Dan Williams
On Fri, Oct 18, 2019 at 2:04 PM Verma, Vishal L wrote: > > On Fri, 2019-10-18 at 13:58 -0700, Dan Williams wrote: > > > > > +++ b/Documentation/daxctl/movable-options.txt > > > @@ -0,0 +1,10 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > + > > > +-M:: > > > +--no-movable:: > > > > If

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Jeff Moyer
Ira Weiny writes: > On Fri, Oct 18, 2019 at 04:23:01PM -0400, Jeff Moyer wrote: >> The 'done' variable only adds confusion. >> >> Signed-off-by: Jeff Moyer >> --- >> ndctl/dimm.c | 7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/ndctl/dimm.c b/ndctl/dimm.c >>

Re: [ndctl PATCH 10/10] daxctl: add --no-movable option for onlining memory

2019-10-18 Thread Verma, Vishal L
On Fri, 2019-10-18 at 13:58 -0700, Dan Williams wrote: > > > +++ b/Documentation/daxctl/movable-options.txt > > @@ -0,0 +1,10 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > + > > +-M:: > > +--no-movable:: > > If --movable is the default I would expect -M to be associated with > --movable. Don't

Re: [ndctl PATCH 10/10] daxctl: add --no-movable option for onlining memory

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > Add a new '--no-movable' option to daxctl commands that may online > memory - i.e. daxctl-reconfigure-device and daxctl-online-memory. > > Users may wish additional control over the state of the newly added > memory. Retain the daxctl default

Re: [ndctl patch 4/4] load-keys: get rid of duplicate assignment

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 04:23:02PM -0400, Jeff Moyer wrote: > Signed-off-by: Jeff Moyer Reviewed-by: Ira Weiny > --- > ndctl/load-keys.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c > index 981f80f..f0b7a5a 100644 > --- a/ndctl/load-keys.c >

Re: [ndctl patch 2/4] fix building of tags tables

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 04:23:00PM -0400, Jeff Moyer wrote: > Make currently fails with: > > make[1]: *** No rule to make target 'libndctl.h', needed by 'tags-am'. Stop. > > The path to libndctl.h is wrong in ndctl/lib/Makefile.am. Fix it. > > Signed-off-by: Jeff Moyer Reviewed-by: Ira

Re: [ndctl patch 1/4] util/abspath: cleanup prefix_filename

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 04:22:59PM -0400, Jeff Moyer wrote: > Static checkers complain about the unused assignment to pfx_len. > The code can obviously be simplified. > > Signed-off-by: Jeff Moyer Reviewed-by: Ira Weiny > --- > util/abspath.c | 6 +- > 1 file changed, 1 insertion(+), 5

Re: [ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 04:23:01PM -0400, Jeff Moyer wrote: > The 'done' variable only adds confusion. > > Signed-off-by: Jeff Moyer > --- > ndctl/dimm.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/ndctl/dimm.c b/ndctl/dimm.c > index c8821d6..f28b9c1 100644 >

Re: [ndctl PATCH 09/10] libdaxctl: add an API to online memory in a non-movable state

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > Some users may want additional control over the state in which memory > gets onlined - specifically, controlling the 'movable' aspect of the > resulting memory blocks. > > Until now, libdaxctl only brought up memory in the 'movable' state.

Re: [ndctl PATCH 08/10] Documentation: clarify memory movablity for reconfigure-device

2019-10-18 Thread Verma, Vishal L
On Fri, 2019-10-18 at 13:46 -0700, Dan Williams wrote: > > > +'daxctl-reconfigure-device' nominally expects that it will online new > > memory > > +blocks as 'movable', so that kernel data doesn't make it into this memory. > > +However, there are other potential agents that may be configured to >

Re: [ndctl PATCH 08/10] Documentation: clarify memory movablity for reconfigure-device

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > Move the note about potential races in memory onlining into the > 'Description' section to make it more prominent. Reword the note to talk > about the sources of such races, and talk about the new 'race detection' > semantics in daxctl. > >

Re: [ndctl PATCH 04/10] libdaxctl: add an API to determine if memory is movable

2019-10-18 Thread Dan Williams
On Fri, Oct 18, 2019 at 12:57 PM Verma, Vishal L wrote: > > > On Fri, 2019-10-18 at 11:54 -0700, Dan Williams wrote: > > On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma > > wrote: > > > By default, daxctl always attempts to online new memory sections as > > > 'movable' so that routine kernel

[ndctl patch 3/4] query_fw_finish_status: get rid of redundant variable

2019-10-18 Thread Jeff Moyer
The 'done' variable only adds confusion. Signed-off-by: Jeff Moyer --- ndctl/dimm.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ndctl/dimm.c b/ndctl/dimm.c index c8821d6..f28b9c1 100644 --- a/ndctl/dimm.c +++ b/ndctl/dimm.c @@ -682,7 +682,6 @@ static int

[ndctl patch 2/4] fix building of tags tables

2019-10-18 Thread Jeff Moyer
Make currently fails with: make[1]: *** No rule to make target 'libndctl.h', needed by 'tags-am'. Stop. The path to libndctl.h is wrong in ndctl/lib/Makefile.am. Fix it. Signed-off-by: Jeff Moyer --- ndctl/lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[ndctl patch 1/4] util/abspath: cleanup prefix_filename

2019-10-18 Thread Jeff Moyer
Static checkers complain about the unused assignment to pfx_len. The code can obviously be simplified. Signed-off-by: Jeff Moyer --- util/abspath.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/util/abspath.c b/util/abspath.c index 09bbd27..e44236f 100644 ---

[ndctl patch 4/4] load-keys: get rid of duplicate assignment

2019-10-18 Thread Jeff Moyer
Signed-off-by: Jeff Moyer --- ndctl/load-keys.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c index 981f80f..f0b7a5a 100644 --- a/ndctl/load-keys.c +++ b/ndctl/load-keys.c @@ -185,7 +185,6 @@ static int load_keys(struct loadkeys *lk_ctx, const char

Re: [ndctl PATCH 07/10] daxctl: detect races when onlining memory blocks

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > Sometimes, system configuration can result in new memory blocks getting > onlined automatically. Often, these auto-onlining mechanisms don't > provide a choice or configurability in the matter of which zone is used > for these new blocks, and

Re: [ndctl PATCH 05/10] libdaxctl: allow memblock_in_dev() to return an error

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > With the MEM_FIND_ZONE operation, and the expectation that it will be > called from 'daxctl list' listings, it is possible that memblock_in_dev() > gets called without sufficient privileges. If this happens, currently, > the above simply

Re: [PATCH] acpi/nfit: unlock on error in scrub_show()

2019-10-18 Thread Ira Weiny
On Fri, Oct 18, 2019 at 03:35:34PM +0300, Dan Carpenter wrote: > We change the locking in this function and forgot to update this error > path so we are accidentally still holding the "dev->lockdep_mutex". > > Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local >

Re: [ndctl PATCH 04/10] libdaxctl: add an API to determine if memory is movable

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > By default, daxctl always attempts to online new memory sections as > 'movable' so that routine kernel allocations aren't serviced from this > memory, and the memory is later removable via hot-unplug. > > System configuration, or other agents

Re: [ndctl PATCH 03/10] daxctl/device.c: fix json output omission for reconfigure-device

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > The reconfig_mode_{devdax,system_ram}() function can have a positive > return status from memory online/offline operations, indicating skipped > memory blocks. Don't omit printing the device listing json in these > cases; the reconfiguration

Re: [ndctl PATCH 02/10] libdaxctl: refactor memblock_is_online() checks

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > The {online,offline}_one_memblock() helpers both open-coded the check > for whether a block is online. There is already a function to perform > this check - memblock_is_online(). Consolidate the checking using this > helper everywhere it is

Re: [ndctl PATCH 01/10] libdaxctl: refactor path construction in op_for_one_memblock()

2019-10-18 Thread Dan Williams
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma wrote: > > In preparation for memblock operations to check additional sysfs > attributes in the memoryXXX block, 'path' can't be prematurely set > to the memoryXXX/state file. > > Push down path construction into each memory op helper, so that each >

Re: [PATCH] ndctl: Use the same align value as original namespace on reconfigure

2019-10-18 Thread Verma, Vishal L
On Fri, 2019-10-18 at 15:55 +0530, Aneesh Kumar K.V wrote: > Aneesh Kumar K.V writes: > > > "Verma, Vishal L" writes: > > > > > On Wed, 2019-08-07 at 10:14 +0530, Aneesh Kumar K.V wrote: > > > > When using reconfigure command to add a `name` to the namespace we end > > > > up updating the

Re: [PATCH] acpi/nfit: unlock on error in scrub_show()

2019-10-18 Thread Dan Williams
On Fri, Oct 18, 2019 at 5:37 AM Dan Carpenter wrote: > > We change the locking in this function and forgot to update this error > path so we are accidentally still holding the "dev->lockdep_mutex". > > Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local > lockdep

[PATCH] acpi/nfit: unlock on error in scrub_show()

2019-10-18 Thread Dan Carpenter
We change the locking in this function and forgot to update this error path so we are accidentally still holding the "dev->lockdep_mutex". Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local lockdep coverage") Signed-off-by: Dan Carpenter --- drivers/acpi/nfit/core.c

Re: [PATCH] ndctl: Use the same align value as original namespace on reconfigure

2019-10-18 Thread Aneesh Kumar K.V
Aneesh Kumar K.V writes: > "Verma, Vishal L" writes: > >> On Wed, 2019-08-07 at 10:14 +0530, Aneesh Kumar K.V wrote: >>> When using reconfigure command to add a `name` to the namespace we end >>> up updating the align attribute. Avoid this by using the value from >>> the original namespace. Do