[ndclt PATCH] ndctl, monitor: Fix duplicate prefix in monitor.log

2018-07-30 Thread QI Fuli
When a monitor runs with [--log] option, the prefix will be dually added to monitor.log. Therefore, the monitor cannot log the smart notification to syslog. This patch is used to prevent prefix from being dually added to monitor.log. Fixes: fdf6b6844ccf ("ndctl, monitor: add a new command -

[PATCH v2] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Jane Chu
05ea88608d4e13 ("mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct") adds a new ->pagesize() function to hugetlb_vm_ops, intended to cover all hugetlbfs backed files. With System V shared memory model, if "huge page" is specified, the "shared memory" is backed by hugetlbfs files, but

Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Jane Chu
Hi, Davidlohr, On 7/30/2018 9:44 AM, Davidlohr Bueso wrote: On Fri, 27 Jul 2018, Jane Chu wrote: Commit 05ea88608d4e13 (mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct) adds a new ->pagesize() function to hugetlb_vm_ops, intended to cover all hugetlbfs backed files. With

[RFC PATCH 1/1] device-dax: check for vma range while dax_mmap.

2018-07-30 Thread Zhang Yi
It should be prevent user map an illegal vma range which larger than dax device phiscal resourse, as we don't have swap logic while page faulting in dax device. Applications, especailly qemu, map the /dev/dax for virtual nvdimm's backend device, we defined the v-nvdimm label area at the end of

Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Jane Chu
Hi, Michal, On 7/30/2018 1:58 AM, Michal Hocko wrote: On Fri 27-07-18 15:17:27, Jane Chu wrote: Commit 05ea88608d4e13 (mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct) adds a new ->pagesize() function to hugetlb_vm_ops, intended to cover all hugetlbfs backed files. With System

Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Jane Chu
Hi, Mathew, On 7/28/2018 12:02 PM, Matthew Wilcox wrote: On Fri, Jul 27, 2018 at 03:17:27PM -0600, Jane Chu wrote: +++ b/include/linux/mm.h @@ -387,6 +387,13 @@ enum page_entry_size { * These are the virtual MM functions - opening of an area, closing and * unmapping it (needed to keep

RE: [ndctl PATCH] ndctl, test/monitor: fix inject-smart field in test_filter_dimmevent

2018-07-30 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Tuesday, July 31, 2018 4:35 AM > To: linux-nvdimm@lists.01.org > Cc: Vishal Verma ; Qi, Fuli/斉 福利 > > Subject: [ndctl PATCH] ndctl, test/monitor: fix inject-smart field in > test_filter_dimmevent > >

Help trying to use /dev/pmem for dax debugging?

2018-07-30 Thread Theodore Y. Ts'o
In newer kernels, it looks like you can't use /dev/pmem0 for DAX unless it's marked as being DAX capable. This appears to require CONFIG_NVDIMM_PFN. But when I tried to build a kernel with that configured, I get the following BUG: [0.00] Linux version

[PATCH 1/1] x86, pmem, acpi: Remove excessive ACPI Large Reference Count warnings

2018-07-30 Thread Mike Travis
With the Intel BIOS support for 8 processor sockets with a full complement of NVDIMMS potentially installable, and there are empty sockets without NVDIMMS, there is an extremely large amount of the following warnings: ACPI Warning: Large Reference Count (0x1001) in object 99453fc71750,

[PATCH] tools/testing/nvdimm: improve emulation of smart injection

2018-07-30 Thread Vishal Verma
The emulation for smart injection commands for nfit neglected to check the smart field validity flags before injecting to that field. This is required as a way to distinguish un-injection vs. leave-alone. The emulation was also missing support for un-injection entirely. To add this support,

[ndctl PATCH] ndctl, test/monitor: fix inject-smart field in test_filter_dimmevent

2018-07-30 Thread Vishal Verma
Change the inject-smart field from -s to -m when testing the dimm-media-temperature event. The -s seems to have been a copy-paste error. Cc: QI Fuli Signed-off-by: Vishal Verma --- test/monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/monitor.sh

Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Davidlohr Bueso
On Fri, 27 Jul 2018, Jane Chu wrote: Commit 05ea88608d4e13 (mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct) adds a new ->pagesize() function to hugetlb_vm_ops, intended to cover all hugetlbfs backed files. With System V shared memory model, if "huge page" is specified, the

Re: [PATCH] ipc/shm.c add ->pagesize function to shm_vm_ops

2018-07-30 Thread Michal Hocko
On Fri 27-07-18 15:17:27, Jane Chu wrote: > Commit 05ea88608d4e13 (mm, hugetlbfs: introduce ->pagesize() to > vm_operations_struct) adds a new ->pagesize() function to > hugetlb_vm_ops, intended to cover all hugetlbfs backed files. > > With System V shared memory model, if "huge page" is

RE: [External] [PATCH v3 0/6] kaddr and pfn can be NULL to ->direct_access()

2018-07-30 Thread Huaisheng HS1 Ye
Missing one in changes log. > From: Huaisheng Ye > Sent: Monday, July 30, 2018 3:16 PM > > From: Huaisheng Ye > > Changes since v2 [2]: > * Collect Martin and Mike's acks for dcssblk and dm-writecache; > * Rebase the series of patch to v4.18-rc7. * Collect Ross's reviewed-by for series. > >

[PATCH v3 6/6] filesystem-dax: Do not request kaddr and pfn when not required

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye Some functions within fs/dax don't need to get local pointer kaddr or variable pfn from direct_access. Using NULL instead of having to pass in useless pointer or variable that caller then just throw away. Signed-off-by: Huaisheng Ye Reviewed-by: Ross Zwisler --- fs/dax.c |

[PATCH v3 5/6] md/dm-writecache: Don't request pointer dummy_addr when not required

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye Function persistent_memory_claim doesn't need to get local pointer dummy_addr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Suggested-by: Ross Zwisler Signed-off-by: Huaisheng Ye Reviewed-by: Ross

[PATCH v3 2/6] s390, dcssblk: kaddr and pfn can be NULL to ->direct_access()

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye dcssblk_direct_access() needs to check the validity of pointers kaddr and pfn for NULL assignment. If anyone equals to NULL, it doesn't need to calculate the value. If either of them is equal to NULL, that is to say callers may have no need for kaddr or pfn, so this patch is

[PATCH v3 3/6] tools/testing/nvdimm: kaddr and pfn can be NULL to ->direct_access()

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye The mock / test version of pmem_direct_access() needs to check the validity of pointers kaddr and pfn for NULL assignment. If anyone equals to NULL, it doesn't need to calculate the value. If pointer equals to NULL, that is to say callers may have no need for kaddr or pfn, so

[PATCH v3 4/6] dax/super: Do not request a pointer kaddr when not required

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye Function __bdev_dax_supported doesn't need to get local pointer kaddr from direct_access. Using NULL instead of having to pass in a useless local pointer that caller then just throw away. Signed-off-by: Huaisheng Ye Reviewed-by: Ross Zwisler --- drivers/dax/super.c | 3 +--

[PATCH v3 0/6] kaddr and pfn can be NULL to ->direct_access()

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye Changes since v2 [2]: * Collect Martin and Mike's acks for dcssblk and dm-writecache; * Rebase the series of patch to v4.18-rc7. Changes since v1 [1]: * Involve the previous patches for pfn can be NULL. * Reword the patch descriptions according to Christian's comment. *

[PATCH v3 1/6] libnvdimm, pmem: kaddr and pfn can be NULL to ->direct_access()

2018-07-30 Thread Huaisheng Ye
From: Huaisheng Ye pmem_direct_access() needs to check the validity of pointers kaddr and pfn for NULL assignment. If anyone equals to NULL, it doesn't need to calculate the value. If pointer equals to NULL, that is to say callers may have no need for kaddr or pfn, so this patch is prepared for