Re: [PATCH 10/17] mm: merge vmem_altmap_alloc into altmap_alloc_block_buf

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > There is no clear separation between the two, so merge them. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Logan Gunthorpe Looks good, Reviewed-by: Dan Williams

Re: [PATCH 09/17] mm: split altmap memory map allocation from normal case

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > No functional changes, just untangling the call chain. I'd also mention that creating more helper functions in the altmap_ namespace helps document why altmap is passed all around the hotplug code. > > Signed-off-by:

Re: [PATCH v3 1/3] acpi: HMAT support in acpi_parse_entries_array()

2017-12-15 Thread Rafael J. Wysocki
On Sat, Dec 16, 2017 at 2:57 AM, Dan Williams wrote: > On Fri, Dec 15, 2017 at 5:53 PM, Rafael J. Wysocki wrote: >> On Friday, December 15, 2017 2:10:17 AM CET Dan Williams wrote: >>> On Wed, Dec 13, 2017 at 6:10 PM, Ross Zwisler >>>

Re: [PATCH 07/17] mm: pass the vmem_altmap to vmemmap_free

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking a few levels into the callchain. > > Signed-off-by: Christoph Hellwig Now I remember why I went with the radix

Re: [PATCH 06/17] mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking 2 levels into the callchain. > > Signed-off-by: Christoph Hellwig wip I assume that "wip" is a typo? Otherwise,

Re: [PATCH 05/17] mm: pass the vmem_altmap to vmemmap_populate

2017-12-15 Thread Dan Williams
[ cc Michal ] On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking a few levels into the callchain. > > Signed-off-by: Christoph Hellwig I know Michal has concerns

Re: [PATCH v3 1/3] acpi: HMAT support in acpi_parse_entries_array()

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 5:53 PM, Rafael J. Wysocki wrote: > On Friday, December 15, 2017 2:10:17 AM CET Dan Williams wrote: >> On Wed, Dec 13, 2017 at 6:10 PM, Ross Zwisler >> wrote: >> > The current implementation of acpi_parse_entries_array()

Re: [PATCH v3 1/3] acpi: HMAT support in acpi_parse_entries_array()

2017-12-15 Thread Rafael J. Wysocki
On Friday, December 15, 2017 2:10:17 AM CET Dan Williams wrote: > On Wed, Dec 13, 2017 at 6:10 PM, Ross Zwisler > wrote: > > The current implementation of acpi_parse_entries_array() assumes that each > > subtable has a standard ACPI subtable entry of type struct > >

Re: [PATCH 04/17] mm: pass the vmem_altmap to arch_add_memory and __add_pages

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > We can just pass this on instead of having to do a radix tree lookup > without proper locking 2 levels into the callchain. > > Signed-off-by: Christoph Hellwig Yeah, the lookup of vmem_altmap is too magical

Re: [PATCH 03/17] mm: don't export __add_pages

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > This function isn't used by any modules, and is only to be called > from core MM code. This includes the calls for the add_pages wrapper > that might be inlined. > > Signed-off-by: Christoph Hellwig Looks

Re: [PATCH 01/17] memremap: provide stubs for vmem_altmap_offset and vmem_altmap_free

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > Currently all calls to those functions are eliminated by the compiler when > CONFIG_ZONE_DEVICE is not set, but this soon won't be the case. > > Signed-off-by: Christoph Hellwig Looks good, Reviewed-by: Dan

Re: [PATCH 02/17] mm: don't export arch_add_memory

2017-12-15 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > Only x86_64 and sh export this symbol, and it is not used by any > modular code. > > Signed-off-by: Christoph Hellwig Looks good, Reviewed-by: Dan Williams

[PATCH v3 4/4] ndctl, test: firmware update unit test

2017-12-15 Thread Dave Jiang
Adding a unit test that will use nfit_test kernel module to test the firmware update sequence. Signed-off-by: Dave Jiang --- ndctl/update.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/ndctl/update.c b/ndctl/update.c index 8d33b6a..a9400d6 100644 ---

[PATCH v3 2/4] ndctl: add firmware download support functions in libndctl

2017-12-15 Thread Dave Jiang
Adding the DSM commands from Intel DSM v1.6 to support firmware update sequence in the libndctl library as additional dimm_ops. Signed-off-by: Dave Jiang --- ndctl/lib/Makefile.am |1 ndctl/lib/firmware.c | 119 ++ ndctl/lib/intel.c | 262

[PATCH v3 1/4] ndctl: add support to alloc_intel_cmd for variable payload

2017-12-15 Thread Dave Jiang
Certain payloads have variable size. The existing alloc_intel_cmd() does not take into account of that. Adding additional size for allocation. We do waste a little bit of the space because of the smart payload. Signed-off-by: Dave Jiang --- ndctl/lib/intel.c |2 +- 1

[PATCH v3 3/4] ndctl: add firmware update command option for ndctl

2017-12-15 Thread Dave Jiang
Adding option "update-firmware" to ndctl for update firmware support from Intel DSM v1.6. ndctl update-firmware takes an option of -f for a firmware binary and a -d for the DIMM name: ndctl update-firmware -d nmem0 -f new_firmware.bin Signed-off-by: Dave Jiang ---

[PATCH v3 0/4] ndctl: add DIMM firmware update support

2017-12-15 Thread Dave Jiang
The following series implements support for DIMM firmware update in ndctl. v3: Addressed Dan's comments - Removed Intel specific bits from update get info. - Added inherited context for related commands - Moved all input params into new_cmd function. - Added translated status return --- Dave

Re: [PATCH v3 2/3] hmat: add heterogeneous memory sysfs support

2017-12-15 Thread Ross Zwisler
On Fri, Dec 15, 2017 at 01:52:03AM +0100, Rafael J. Wysocki wrote: <> > > diff --git a/drivers/acpi/hmat/core.c b/drivers/acpi/hmat/core.c > > new file mode 100644 > > index ..61b90dadf84b > > --- /dev/null > > +++ b/drivers/acpi/hmat/core.c > > @@ -0,0 +1,536 @@ > > +/* > > + *

Re: [PATCH 0/2] ext4: Fix ENOSPC handling for DAX faults

2017-12-15 Thread Ross Zwisler
On Wed, Dec 13, 2017 at 10:13:50AM +0100, Jan Kara wrote: > Hello, > > these two patches fix handling of ENOSPC during DAX faults. The problem is > that currently running transaction may be holding lots of already freed > blocks which can be reallocated only once the transaction commits. Standard

Re: [PATCH v2 3/4] ndctl: add firmware update command option for ndctl

2017-12-15 Thread Dan Williams
On Wed, Dec 6, 2017 at 2:47 PM, Dave Jiang wrote: > Adding option "update-firmware" to ndctl for update firmware support from > Intel DSM v1.6. ndctl update-firmware takes an option of -f for a firmware > binary and a -d for the DIMM name: > ndctl update-firmware -d nmem0 -f

Re: [PATCH v2 3/4] ndctl: add firmware update command option for ndctl

2017-12-15 Thread Dan Williams
On Wed, Dec 6, 2017 at 2:47 PM, Dave Jiang wrote: > Adding option "update-firmware" to ndctl for update firmware support from > Intel DSM v1.6. ndctl update-firmware takes an option of -f for a firmware > binary and a -d for the DIMM name: > ndctl update-firmware -d nmem0 -f

Re: [PATCH v2 2/4] ndctl: add firmware download support functions in libndctl

2017-12-15 Thread Dan Williams
On Wed, Dec 6, 2017 at 2:47 PM, Dave Jiang wrote: > Adding the DSM commands from Intel DSM v1.6 to support firmware update > sequence in the libndctl library as additional dimm_ops. > > Signed-off-by: Dave Jiang [..] > +int

Re: [PATCH v2 2/4] ndctl: add firmware download support functions in libndctl

2017-12-15 Thread Dan Williams
On Wed, Dec 6, 2017 at 2:47 PM, Dave Jiang wrote: > Adding the DSM commands from Intel DSM v1.6 to support firmware update > sequence in the libndctl library as additional dimm_ops. > > Signed-off-by: Dave Jiang Some more type clarifications and api

[PATCH 15/17] memremap: drop private struct page_map

2017-12-15 Thread Christoph Hellwig
From: Logan Gunthorpe 'struct page_map' is a private structure of 'struct dev_pagemap' but the latter replicates all the same fields as the former so there isn't much value in it. Thus drop it in favour of a completely public struct. This is a clean up in preperation for a

[PATCH 17/17] memremap: merge find_dev_pagemap into get_dev_pagemap

2017-12-15 Thread Christoph Hellwig
There is only one caller of the trivial function find_dev_pagemap left, so just merge it into the caller. Signed-off-by: Christoph Hellwig --- kernel/memremap.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index

[PATCH 16/17] memremap: change devm_memremap_pages interface to use struct dev_pagemap

2017-12-15 Thread Christoph Hellwig
From: Logan Gunthorpe This new interface is similar to how struct device (and many others) work. The caller initializes a 'struct dev_pagemap' as required and calls 'devm_memremap_pages'. This allows the pagemap structure to be embedded in another structure and thus

[PATCH 10/17] mm: merge vmem_altmap_alloc into altmap_alloc_block_buf

2017-12-15 Thread Christoph Hellwig
There is no clear separation between the two, so merge them. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe --- mm/sparse-vmemmap.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) diff --git

[PATCH 09/17] mm: split altmap memory map allocation from normal case

2017-12-15 Thread Christoph Hellwig
No functional changes, just untangling the call chain. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe --- arch/powerpc/mm/init_64.c | 5 - arch/x86/mm/init_64.c | 5 - include/linux/mm.h| 9 ++--- mm/sparse-vmemmap.c

[PATCH 14/17] memremap: simplify duplicate region handling in devm_memremap_pages

2017-12-15 Thread Christoph Hellwig
__radix_tree_insert already checks for duplicates and returns -EEXIST in that case, so remove the duplicate (and racy) duplicates check. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe --- kernel/memremap.c | 11 --- 1 file changed, 11

[PATCH 13/17] memremap: remove to_vmem_altmap

2017-12-15 Thread Christoph Hellwig
All callers are gone now. Signed-off-by: Christoph Hellwig --- include/linux/memremap.h | 9 - kernel/memremap.c| 26 -- 2 files changed, 35 deletions(-) diff --git a/include/linux/memremap.h b/include/linux/memremap.h index

[PATCH 12/17] mm: optimize dev_pagemap reference counting around get_dev_pagemap

2017-12-15 Thread Christoph Hellwig
Change the calling convention so that get_dev_pagemap always consumes the previous reference instead of doing this using an explicit earlier call to put_dev_pagemap in the callers. The callers will still need to put the final reference after finishing the loop over the pages. Signed-off-by:

[PATCH 04/17] mm: pass the vmem_altmap to arch_add_memory and __add_pages

2017-12-15 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking 2 levels into the callchain. Signed-off-by: Christoph Hellwig --- arch/ia64/mm/init.c| 5 +++-- arch/powerpc/mm/mem.c | 5 +++-- arch/s390/mm/init.c| 5

[PATCH 08/17] mm: pass the vmem_altmap to memmap_init_zone

2017-12-15 Thread Christoph Hellwig
Pass the vmem_altmap two levels down instead of needing a lookup. Signed-off-by: Christoph Hellwig --- arch/ia64/mm/init.c| 9 + include/linux/memory_hotplug.h | 2 +- include/linux/mm.h | 4 ++-- kernel/memremap.c | 2 +- mm/hmm.c

[PATCH 11/17] mm: move get_dev_pagemap out of line

2017-12-15 Thread Christoph Hellwig
This is a pretty big function, which should be out of line in general, and a no-op stub if CONFIG_ZONE_DEVICЕ is not set. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe --- include/linux/memremap.h | 39 ---

[PATCH 07/17] mm: pass the vmem_altmap to vmemmap_free

2017-12-15 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking a few levels into the callchain. Signed-off-by: Christoph Hellwig --- arch/arm64/mm/mmu.c| 3 +- arch/ia64/mm/discontig.c | 3 +- arch/powerpc/mm/init_64.c | 5 ++--

[PATCH 06/17] mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

2017-12-15 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking 2 levels into the callchain. Signed-off-by: Christoph Hellwig wip --- arch/ia64/mm/init.c| 4 ++-- arch/powerpc/mm/mem.c | 6 ++ arch/s390/mm/init.c| 2 +-

[PATCH 05/17] mm: pass the vmem_altmap to vmemmap_populate

2017-12-15 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking a few levels into the callchain. Signed-off-by: Christoph Hellwig --- arch/arm64/mm/mmu.c| 6 -- arch/ia64/mm/discontig.c | 3 ++- arch/powerpc/mm/init_64.c | 7

[PATCH 03/17] mm: don't export __add_pages

2017-12-15 Thread Christoph Hellwig
This function isn't used by any modules, and is only to be called from core MM code. This includes the calls for the add_pages wrapper that might be inlined. Signed-off-by: Christoph Hellwig --- mm/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 02/17] mm: don't export arch_add_memory

2017-12-15 Thread Christoph Hellwig
Only x86_64 and sh export this symbol, and it is not used by any modular code. Signed-off-by: Christoph Hellwig --- arch/sh/mm/init.c | 1 - arch/x86/mm/init_64.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index

revamp vmem_altmap / dev_pagemap handling V2

2017-12-15 Thread Christoph Hellwig
Hi all, this series started with two patches from Logan that now are in the middle of the series to kill the memremap-internal pgmap structure and to redo the dev_memreamp_pages interface to be better suitable for future PCI P2P uses. I reviewed them and noticed that there isn't really any good

[PATCH 01/17] memremap: provide stubs for vmem_altmap_offset and vmem_altmap_free

2017-12-15 Thread Christoph Hellwig
Currently all calls to those functions are eliminated by the compiler when CONFIG_ZONE_DEVICE is not set, but this soon won't be the case. Signed-off-by: Christoph Hellwig --- include/linux/memremap.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff

转发:研 发 绩 效 管 理

2017-12-15 Thread 宋�吾
¸½¼þÏêÔÄ 18:52:46 ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm