Re: [PATCH v6 01/12] mm/sparsemem: Introduce struct mem_section_usage

2019-05-03 Thread Dan Williams
On Wed, May 1, 2019 at 11:07 PM Dan Williams wrote: > > On Wed, May 1, 2019 at 4:25 PM Pavel Tatashin > wrote: > > > > On 19-04-17 11:39:00, Dan Williams wrote: > > > Towards enabling memory hotplug to track partial population of a > > > section, introduce 'struct mem_section_usage'. > > > > >

Re: [PATCH v2 16/17] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-05-03 Thread Brendan Higgins
> On Thu, May 02, 2019 at 11:45:43AM -0700, Brendan Higgins wrote: > > On Thu, May 2, 2019 at 11:15 AM wrote: > > > > > > > > > > > > > -Original Message- > > > > From: Greg KH > > > > > > > > On Wed, May 01, 2019 at 04:01:25PM -0700, Brendan Higgins wrote: > > > > > From: Iurii Zaikin >

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-03 Thread Brendan Higgins
> On 5/2/19 10:36 PM, Brendan Higgins wrote: > > On Thu, May 2, 2019 at 6:45 PM Frank Rowand wrote: > >> > >> On 5/2/19 4:45 PM, Brendan Higgins wrote: > >>> On Thu, May 2, 2019 at 2:16 PM Frank Rowand > >>> wrote: > > On 5/2/19 11:07 AM, Brendan Higgins wrote: > > On Thu, May 2,

[ndctl PATCH 6/8] Documentation/daxctl: add a man page for daxctl-reconfigure-device

2019-05-03 Thread Vishal Verma
Add a man page describing the new daxctl-reconfigure-device command. Cc: Pavel Tatashin Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Vishal Verma --- Documentation/daxctl/Makefile.am | 3 +- .../daxctl/daxctl-reconfigure-device.txt | 74 +++ 2 files

[ndctl PATCH 5/8] daxctl: add a new reconfigure-device command

2019-05-03 Thread Vishal Verma
Add a new command 'daxctl-reconfigure-device'. This is used to switch the mode of a dax device between regular 'device_dax' and 'system-memory'. The command also uses the memory hotplug sysfs interfaces to online the newly available memory when converting to 'system-ram', and to attempt to offline

[ndctl PATCH 4/8] ndctl: add helpers to get/set the online state for a node

2019-05-03 Thread Vishal Verma
In preparation for converting DAX devices for use as system-ram via the kernel's 'kmem' facility, add libndctl helpers to manipulate the sysfs interfaces to get the target_node of a DAX device, and to online, offline, and query the state of hotplugged memory sections associated with a given node.

[ndctl PATCH 8/8] contrib/ndctl: add bash-completion for daxctl-reconfigure-device

2019-05-03 Thread Vishal Verma
Add bash completion helpers for the new daxctl-reconfigure-device command. Cc: Dan Williams Signed-off-by: Vishal Verma --- contrib/ndctl | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/contrib/ndctl b/contrib/ndctl index d1f8bd6..32c4731 100755 ---

[ndctl PATCH 3/8] daxctl: add libdaxctl interfaces to enable/disable devices

2019-05-03 Thread Vishal Verma
Add new libdaxctl interfaces to disable a device_dax based devices, and to enable it into a given mode. The modes available are 'device_dax', and 'system-ram', where device_dax is the normal device DAX mode used via a character device, and 'system-ram' uses the kernel's 'kmem' facility to hotplug

[ndctl PATCH 2/8] libdaxctl: cache 'subsystem' in daxctl_ctx

2019-05-03 Thread Vishal Verma
The 'DAX subsystem' in effect is determined at region or device init time, and dictates the sysfs base paths for all device/region operations. In preparation for adding bind/unbind functionality, cache the subsystem as determined at init time in the library context. Cc: Dan Williams

[ndctl PATCH 7/8] contrib/ndctl: fix region-id completions for daxctl

2019-05-03 Thread Vishal Verma
The completion helpers for daxctl assumed the region arguments for specifying daxctl regions were the same as ndctl regions, i.e. "regionX". This is not true - daxctl region arguments are a simple numeric 'id'. Add a new helper __daxctl_get_regions() to complete daxctl region IDs properly. While

[ndctl PATCH 0/8] daxctl: add a new reconfigure-device command

2019-05-03 Thread Vishal Verma
Add a new daxctl-reconfigure-device command that lets us reconfigure DAX devices back and forth between 'system-ram' and 'device-dax' modes. It also includes facilities to online any newly hot-plugged memory (default), and attempt to offline memory before converting away from the system-ram mode

[ndctl PATCH 1/8] libdaxctl: add interfaces in support of device modes

2019-05-03 Thread Vishal Verma
In preparation for libdaxctl and daxctl to grow operational modes for DAX devices, add the following supporting APIs: daxctl_dev_get_ctx daxctl_dev_is_enabled Cc: Dan Williams Signed-off-by: Vishal Verma --- daxctl/lib/libdaxctl.c | 30 ++

Re: [PATCH v7 03/12] mm/sparsemem: Add helpers track active portions of a section at boot

2019-05-03 Thread Pavel Tatashin
On 19-05-01 22:55:37, Dan Williams wrote: > Prepare for hot{plug,remove} of sub-ranges of a section by tracking a > section active bitmask, each bit representing 2MB (SECTION_SIZE (128M) / > map_active bitmask length (64)). If it turns out that 2MB is too large > of an active tracking granularity

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-03 Thread Frank Rowand
On 5/2/19 10:36 PM, Brendan Higgins wrote: > On Thu, May 2, 2019 at 6:45 PM Frank Rowand wrote: >> >> On 5/2/19 4:45 PM, Brendan Higgins wrote: >>> On Thu, May 2, 2019 at 2:16 PM Frank Rowand wrote: On 5/2/19 11:07 AM, Brendan Higgins wrote: > On Thu, May 2, 2019 at 4:02 AM Greg KH

Re: [PATCH v2 15/17] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-03 Thread shuah
On 5/1/19 5:01 PM, Brendan Higgins wrote: Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5c38f21aee787..c78ae95c56b80

Re: [PATCH v2 11/17] kunit: test: add test managed resource tests

2019-05-03 Thread shuah
On 5/1/19 5:01 PM, Brendan Higgins wrote: From: Avinash Kondareddy Tests how tests interact with test managed resources in their lifetime. Signed-off-by: Avinash Kondareddy Signed-off-by: Brendan Higgins --- I think this change log could use more details. It is vague on what it does.

Re: [PATCH v6 02/12] mm/sparsemem: Introduce common definitions for the size and mask of a section

2019-05-03 Thread Oscar Salvador
On Fri, May 03, 2019 at 08:57:09AM -0400, Pavel Tatashin wrote: > On Fri, May 3, 2019 at 6:35 AM Robin Murphy wrote: > > > > On 03/05/2019 01:41, Dan Williams wrote: > > > On Thu, May 2, 2019 at 7:53 AM Pavel Tatashin > > > wrote: > > >> > > >> On Wed, Apr 17, 2019 at 2:52 PM Dan Williams > >

Re: [PATCH v6 02/12] mm/sparsemem: Introduce common definitions for the size and mask of a section

2019-05-03 Thread Pavel Tatashin
On Fri, May 3, 2019 at 6:35 AM Robin Murphy wrote: > > On 03/05/2019 01:41, Dan Williams wrote: > > On Thu, May 2, 2019 at 7:53 AM Pavel Tatashin > > wrote: > >> > >> On Wed, Apr 17, 2019 at 2:52 PM Dan Williams > >> wrote: > >>> > >>> Up-level the local section size and mask from

Re: [PATCH v7 09/12] mm/sparsemem: Support sub-section hotplug

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:56:10PM -0700, Dan Williams wrote: > The libnvdimm sub-system has suffered a series of hacks and broken > workarounds for the memory-hotplug implementation's awkward > section-aligned (128MB) granularity. For example the following backtrace > is emitted when attempting

Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-03 Thread Logan Gunthorpe
On 2019-05-03 12:48 a.m., Brendan Higgins wrote: > On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: >> On 2019-05-01 5:01 p.m., Brendan Higgins wrote: >>> +/* >>> + * struct kunit_try_catch - provides a generic way to run code which might >>> fail. >>> + * @context: used to pass user

Re: [PATCH v7 08/12] mm/sparsemem: Prepare for sub-section ranges

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:56:05PM -0700, Dan Williams wrote: > Prepare the memory hot-{add,remove} paths for handling sub-section > ranges by plumbing the starting page frame and number of pages being > handled through arch_{add,remove}_memory() to > sparse_{add,remove}_one_section(). > > This

Re: [PATCH v6 00/12] mm: Sub-section memory hotplug support

2019-05-03 Thread Oscar Salvador
On Thu, May 02, 2019 at 04:20:03PM -0700, Dan Williams wrote: > On Thu, May 2, 2019 at 3:46 PM Pavel Tatashin > wrote: > > > > Hi Dan, > > > > How do you test these patches? Do you have any instructions? > > Yes, I briefly mentioned this in the cover letter, but here is the > test I am using: >

Re: [PATCH v6 02/12] mm/sparsemem: Introduce common definitions for the size and mask of a section

2019-05-03 Thread Robin Murphy
On 03/05/2019 01:41, Dan Williams wrote: On Thu, May 2, 2019 at 7:53 AM Pavel Tatashin wrote: On Wed, Apr 17, 2019 at 2:52 PM Dan Williams wrote: Up-level the local section size and mask from kernel/memremap.c to global definitions. These will be used by the new sub-section hotplug

Re: [v5 2/3] mm/hotplug: make remove_memory() interface useable

2019-05-03 Thread David Hildenbrand
On 02.05.19 20:43, Pavel Tatashin wrote: > As of right now remove_memory() interface is inherently broken. It tries > to remove memory but panics if some memory is not offline. The problem > is that it is impossible to ensure that all memory blocks are offline as > this function also takes

Re: [PATCH v7 05/12] mm/sparsemem: Convert kmalloc_section_memmap() to populate_section_memmap()

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:55:48PM -0700, Dan Williams wrote: > Allow sub-section sized ranges to be added to the memmap. > populate_section_memmap() takes an explict pfn range rather than > assuming a full section, and those parameters are plumbed all the way > through to vmmemap_populate().

Re: [PATCH v7 02/12] mm/sparsemem: Introduce common definitions for the size and mask of a section

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:55:32PM -0700, Dan Williams wrote: > Up-level the local section size and mask from kernel/memremap.c to > global definitions. These will be used by the new sub-section hotplug > support. > > Cc: Michal Hocko > Cc: Vlastimil Babka > Cc: Jérôme Glisse > Cc: Logan

Re: [PATCH v7 06/12] mm/hotplug: Kill is_dev_zone() usage in __remove_pages()

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:55:53PM -0700, Dan Williams wrote: > The zone type check was a leftover from the cleanup that plumbed altmap > through the memory hotplug path, i.e. commit da024512a1fa "mm: pass the > vmem_altmap to arch_remove_memory and __remove_pages". > > Cc: Michal Hocko > Cc:

Re: [PATCH v7 01/12] mm/sparsemem: Introduce struct mem_section_usage

2019-05-03 Thread Oscar Salvador
On Wed, May 01, 2019 at 10:55:27PM -0700, Dan Williams wrote: > Towards enabling memory hotplug to track partial population of a > section, introduce 'struct mem_section_usage'. > > A pointer to a 'struct mem_section_usage' instance replaces the existing > pointer to a 'pageblock_flags' bitmap.

Re: [PATCH v7 03/12] mm/sparsemem: Add helpers track active portions of a section at boot

2019-05-03 Thread Oscar Salvador
On Thu, May 02, 2019 at 07:03:45AM -0700, Dan Williams wrote: > > section_active_mask() also converts the value to address/size. > > Why do we need to convert the values and we cannot work with pfn/pages > > instead? > > It should be perfectly possible unless I am missing something. > > > > The

Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-03 Thread Brendan Higgins
On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: > > > > On 2019-05-01 5:01 p.m., Brendan Higgins wrote: > > +/* > > + * struct kunit_try_catch - provides a generic way to run code which might > > fail. > > + * @context: used to pass user data to the try and catch functions. > > + * > > + *

Re: [PATCH v2 16/17] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-05-03 Thread Greg KH
On Thu, May 02, 2019 at 11:45:43AM -0700, Brendan Higgins wrote: > On Thu, May 2, 2019 at 11:15 AM wrote: > > > > > > > > > -Original Message- > > > From: Greg KH > > > > > > On Wed, May 01, 2019 at 04:01:25PM -0700, Brendan Higgins wrote: > > > > From: Iurii Zaikin > > > > > > > > KUnit

Re: [PATCH v2 12/17] kunit: tool: add Python wrappers for running KUnit tests

2019-05-03 Thread Greg KH
On Thu, May 02, 2019 at 04:45:29PM -0700, Brendan Higgins wrote: > On Thu, May 2, 2019 at 2:16 PM Frank Rowand wrote: > > > > On 5/2/19 11:07 AM, Brendan Higgins wrote: > > > On Thu, May 2, 2019 at 4:02 AM Greg KH wrote: > > >> > > >> On Wed, May 01, 2019 at 04:01:21PM -0700, Brendan Higgins