RE: Problems with VM_MIXEDMAP removal from /proc//smaps

2018-10-30 Thread y-g...@fujitsu.com
Hello, > On Mon, Oct 29, 2018 at 11:30:41PM -0700, Dan Williams wrote: > > On Thu, Oct 18, 2018 at 5:58 PM Dave Chinner wrote: > > > On Thu, Oct 18, 2018 at 04:55:55PM +0200, Jan Kara wrote: > > > > On Thu 18-10-18 11:25:10, Dave Chinner wrote: > > > > > On Wed, Oct 17, 2018 at 04:23:50PM -0400,

Re: [PATCH 0/9] Allow persistent memory to be used like normal RAM

2018-10-30 Thread Yang Shi
On Mon, Oct 22, 2018 at 1:18 PM Dave Hansen wrote: > > Persistent memory is cool. But, currently, you have to rewrite > your applications to use it. Wouldn't it be cool if you could > just have it show up in your system like normal RAM and get to > it like a slow blob of memory? Well... have I

[PATCH 3/8] device-dax: Remove multi-resource infrastructure

2018-10-30 Thread Dan Williams
The multi-resource implementation anticipated discontiguous sub-division support. That has not yet materialized, delete the infrastructure and related code. Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |4 --- drivers/dax/device-dax.h |3 +- drivers/dax/device.c

[PATCH 2/8] device-dax: Kill dax_region base

2018-10-30 Thread Dan Williams
Nothing consumes this attribute of a region and devres otherwise remembers the value for de-allocation purposes. Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |2 -- drivers/dax/device-dax.h |5 ++--- drivers/dax/device.c |3 +-- drivers/dax/pmem.c|2 +-

[PATCH 1/8] device-dax: Kill dax_region ida

2018-10-30 Thread Dan Williams
Commit bbb3be170ac2 "device-dax: fix sysfs duplicate warnings" arranged for passing a dax instance-id to devm_create_dax_dev(), rather than generating one internally. Remove the dax_region ida and related code. Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |3 ---

[PATCH 7/8] device-dax: Add support for a dax override driver

2018-10-30 Thread Dan Williams
Introduce the 'new_id' concept for enabling a custom device-driver attach policy for dax-bus drivers. The intended use is to have a mechanism for hot-plugging device-dax ranges into the page allocator on-demand. With this in place the default policy of using device-dax for performance

[PATCH 4/8] device-dax: Start defining a dax bus model

2018-10-30 Thread Dan Williams
Towards eliminating the dax_class, move the dax-device-attribute enabling to a new bus.c file in the core. The amount of code thrash of sub-sequent patches is reduced as no logic changes are made, just pure code movement. A temporary export of unregister_dex_dax() and dax_attribute_groups is

[PATCH 5/8] device-dax: Introduce bus + driver model

2018-10-30 Thread Dan Williams
In support of multiple device-dax instances per device-dax-region and allowing the 'kmem' driver to attach to dax-instances instead of the current device-node access, convert the dax sub-system from a class to a bus. Recall that the kmem driver takes reserved / special purpose memories and assigns

[PATCH 6/8] device-dax: Move resource pinning+mapping into the common driver

2018-10-30 Thread Dan Williams
Move the responsibility of calling devm_request_resource() and devm_memremap_pages() into the common device-dax driver. This is another preparatory step to allowing an alternate personality driver for a device-dax range. Signed-off-by: Dan Williams --- drivers/dax/bus.c |6 ++-

[PATCH 8/8] device-dax: Add /sys/class/dax backwards compatibility

2018-10-30 Thread Dan Williams
On the expectation that some environments may not upgrade libdaxctl (userspace component that depends on the /sys/class/dax hierarchy), provide a default / legacy dax_pmem_compat driver. The dax_pmem_compat driver implements the original /sys/class/dax sysfs layout rather than /sys/bus/dax. When

[PATCH 0/8] Introduce a device-dax bus-based device-model

2018-10-30 Thread Dan Williams
Prompted by the review of "[PATCH 0/9] Allow persistent memory to be used like normal RAM" [1] introduce a new bus / device-driver-model for device-dax. Currently device-dax instances result from attaching an nvdimm namespace device to the dax_pmem driver. These instances are registered with the

Re: [RFC PATCH] kvm: Use huge pages for DAX-backed files

2018-10-30 Thread Yu Zhang
On Mon, Oct 29, 2018 at 08:10:52PM -0700, Dan Williams wrote: > On Mon, Oct 29, 2018 at 5:29 PM Barret Rhoden wrote: > > > > On 2018-10-29 at 15:25 Dan Williams wrote: > > > > + /* > > > > +* Our caller grabbed the KVM mmu_lock with a successful > > > > +*

Re: [PATCH v2] tools/testing/nvdimm: Fix the array size for dimm devices.

2018-10-30 Thread Dan Williams
On Tue, Oct 30, 2018 at 6:51 PM Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > KASAN reports following global out of bounds access while > nfit_test is being loaded. The out of bound access happens > the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is > over than the index

[PATCH v2] tools/testing/nvdimm: Fix the array size for dimm devices.

2018-10-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma KASAN reports following global out of bounds access while nfit_test is being loaded. The out of bound access happens the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is over than the index value, NUM_DCR (==5). static int override_return_code(int dimm,

Re: [PATCH] tools/testing/nvdimm: Fix the index for dimm devices.

2018-10-30 Thread Masayoshi Mizuma
On Tue, Oct 30, 2018 at 03:30:05PM -0700, Dan Williams wrote: > On Mon, Oct 29, 2018 at 12:11 PM Masayoshi Mizuma > wrote: > > > > From: Masayoshi Mizuma > > > > KASAN reports following global out of bounds access while > > nfit_test is being loaded. The out of bound access happens > > the

什么样的管理是最适合企业的管理

2018-10-30 Thread 孟先生
linux-nvdimm@lists.01.org 附...件... ...亲...启 ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: Problems with VM_MIXEDMAP removal from /proc//smaps

2018-10-30 Thread Dan Williams
On Tue, Oct 30, 2018 at 3:49 PM Dave Chinner wrote: > > On Mon, Oct 29, 2018 at 11:30:41PM -0700, Dan Williams wrote: > > On Thu, Oct 18, 2018 at 5:58 PM Dave Chinner wrote: > > > On Thu, Oct 18, 2018 at 04:55:55PM +0200, Jan Kara wrote: > > > > On Thu 18-10-18 11:25:10, Dave Chinner wrote: > >

Re: [PATCH] tools/testing/nvdimm: Fix the index for dimm devices.

2018-10-30 Thread Dan Williams
On Mon, Oct 29, 2018 at 12:11 PM Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > KASAN reports following global out of bounds access while > nfit_test is being loaded. The out of bound access happens > the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is > over than the index

Re: [PATCH] tools/testing/nvdimm: Fix the index for dimm devices.

2018-10-30 Thread Dan Williams
On Mon, Oct 29, 2018 at 12:11 PM Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > KASAN reports following global out of bounds access while > nfit_test is being loaded. The out of bound access happens > the following reference to dimm_fail_cmd_flags[dimm]. 'dimm' is > over than the index

Re: [RFC PATCH] kvm: Use huge pages for DAX-backed files

2018-10-30 Thread Barret Rhoden
On 2018-10-29 at 20:10 Dan Williams wrote: > > > > static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu, > > > > gfn_t *gfnp, kvm_pfn_t *pfnp, > > > > int *levelp) > > > > @@ -3168,7 +3237,7 @@ static void

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-30 Thread Dan Williams
On Tue, Oct 30, 2018 at 1:18 AM Michal Hocko wrote: > > On Mon 29-10-18 23:55:12, Dan Williams wrote: > > On Mon, Oct 29, 2018 at 11:29 PM Michal Hocko wrote: [..] > > That testing identified this initialization performance problem and > > thankfully got it addressed in time for the current

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-30 Thread Michal Hocko
On Mon 29-10-18 23:55:12, Dan Williams wrote: > On Mon, Oct 29, 2018 at 11:29 PM Michal Hocko wrote: > > > > On Mon 29-10-18 12:59:11, Alexander Duyck wrote: > > > On Mon, 2018-10-29 at 19:18 +0100, Michal Hocko wrote: > [..] > > > The patches Andrew pushed addressed the immediate issue so that

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-30 Thread Oscar Salvador
> Yes, the hotplug lock was part of the original issue. However that > starts to drift into the area I believe Oscar was working on as a part > of his patch set in encapsulating the move_pfn_range_to_zone and other > calls that were contained in the hotplug lock into their own functions. While

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-30 Thread Dan Williams
On Mon, Oct 29, 2018 at 11:29 PM Michal Hocko wrote: > > On Mon 29-10-18 12:59:11, Alexander Duyck wrote: > > On Mon, 2018-10-29 at 19:18 +0100, Michal Hocko wrote: [..] > > The patches Andrew pushed addressed the immediate issue so that now > > systems with nvdimm/DAX memory can at least

Re: Problems with VM_MIXEDMAP removal from /proc//smaps

2018-10-30 Thread Dan Williams
On Thu, Oct 18, 2018 at 5:58 PM Dave Chinner wrote: > > On Thu, Oct 18, 2018 at 04:55:55PM +0200, Jan Kara wrote: > > On Thu 18-10-18 11:25:10, Dave Chinner wrote: > > > On Wed, Oct 17, 2018 at 04:23:50PM -0400, Jeff Moyer wrote: > > > > MAP_SYNC > > > > - file system guarantees that metadata

Re: [PATCH v5 4/4] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

2018-10-30 Thread Michal Hocko
On Mon 29-10-18 12:59:11, Alexander Duyck wrote: > On Mon, 2018-10-29 at 19:18 +0100, Michal Hocko wrote: [...] I will try to get to your other points later. > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 89d2a2ab3fe6..048e4cc72fdf 100644 > > --- a/mm/page_alloc.c > > +++