On Fri, 2019-10-18 at 11:54 -0700, Dan Williams wrote: > On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma <[email protected]> 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 (such as udev rules) may race > > 'daxctl' to online memory, and this may result in the memory not being > > 'movable'. Add an interface to query the movability of a memory object > > associated with a dax device. > > > > This is in preparation to both display a 'movable' attribute in device > > listings, as well as optionally allowing memory to be onlined as > > non-movable. > > > > Cc: Dan Williams <[email protected]> > > Reported-by: Ben Olson <[email protected]> > > Signed-off-by: Vishal Verma <[email protected]> > > --- > > daxctl/lib/libdaxctl-private.h | 20 +++++++++ > > daxctl/lib/libdaxctl.c | 77 ++++++++++++++++++++++++++++++++-- > > daxctl/lib/libdaxctl.sym | 5 +++ > > daxctl/libdaxctl.h | 1 + > > 4 files changed, 100 insertions(+), 3 deletions(-) > > > > diff --git a/daxctl/lib/libdaxctl-private.h b/daxctl/lib/libdaxctl-private.h > > index 7ba3c46..82939bb 100644 > > --- a/daxctl/lib/libdaxctl-private.h > > +++ b/daxctl/lib/libdaxctl-private.h > > @@ -44,6 +44,25 @@ enum memory_op { > > MEM_SET_ONLINE, > > MEM_IS_ONLINE, > > MEM_COUNT, > > + MEM_FIND_ZONE, > > This is private so the naming is not too big a concern, but isn't this > a MEM_GET_ZONE? A find operation to me is something that can succeed > to find nothing, whereas a get operation fail assumes the association > can always be retrieved barring exceptional conditions.
Hm, my personal view of find vs. get was that 'get' grabs a reference (or similar) to something which we know how to get to (have a pointer directly) etc. 'Find' is more of a 'go searching for' something - and it may involve walking and looping over data structures. But I'm not too opposed to this, and can change to 'get' if that follows convention better. _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
