Re: [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
Hi Cornelia, > On Tue, 11 Jun 2019 22:07:57 +0530 > Pankaj Gupta wrote: > > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with

Re: [RFC PATCH v2 2/2] Implement sharing/unsharing of PMDs for FS/DAX

2019-06-11 Thread Kirill A. Shutemov
On Fri, Jun 07, 2019 at 12:51:03PM -0700, Larry Bassel wrote: > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 3a54c9d..1c1ed4e 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -4653,9 +4653,9 @@ long hugetlb_unreserve_pages(struct inode *inode, long > start, long end, > } > > #ifdef

Re: [Qemu-devel] [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> On Tue, Jun 11 2019 at 12:37pm -0400, > Pankaj Gupta wrote: > > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > > devices of device mapper support synchrononous DAX. If device > > mapper consists of both synchronous and asynchronous dax devices, > > we don't set

Re: [PATCH, RFC 2/2] Implement sharing/unsharing of PMDs for FS/DAX

2019-06-11 Thread Kirill A. Shutemov
On Fri, May 24, 2019 at 09:07:11AM -0700, Larry Bassel wrote: > Again, I don't think this can happen in DAX. The only sharing allowed > is for FS/DAX/2MiB pagesize. Hm. I still don't follow. How do you guarantee that DAX actually allocated continues space for the file on backing storage and you

[PATCH 6/6] driver-core, libnvdimm: Let device subsystems add local lockdep coverage

2019-06-11 Thread Dan Williams
For good reason, the standard device_lock() is marked lockdep_set_novalidate_class() because there is simply no sane way to describe the myriad ways the device_lock() ordered with other locks. However, that leaves subsystems that know their own local device_lock() ordering rules to find lock

[PATCH 3/6] libnvdimm/region: Register badblocks before namespaces

2019-06-11 Thread Dan Williams
Namespace activation expects to be able to reference region badblocks. The following warning sometimes triggers when asynchronous namespace activation races in front of the completion of namespace probing. Move all possible namespace probing after region badblocks initialization. Otherwise,

[PATCH 5/6] libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock

2019-06-11 Thread Dan Williams
A multithreaded namespace creation/destruction stress test currently deadlocks with the following lockup signature: INFO: task ndctl:2924 blocked for more than 122 seconds. Tainted: G OE 5.2.0-rc4+ #3382 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables

[PATCH 4/6] libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()

2019-06-11 Thread Dan Williams
In preparation for fixing a deadlock between wait_for_bus_probe_idle() and the nvdimm_bus_list_mutex arrange for __nd_ioctl() without nvdimm_bus_list_mutex held. This also unifies the 'dimm' and 'bus' level ioctls into a common nd_ioctl() preamble implementation. Marked for -stable as it is a

[PATCH 1/6] drivers/base: Introduce kill_device()

2019-06-11 Thread Dan Williams
The libnvdimm subsystem arranges for devices to be destroyed as a result of a sysfs operation. Since device_unregister() cannot be called from an actively running sysfs attribute of the same device libnvdimm arranges for device_unregister() to be performed in an out-of-line async context. The

[PATCH 2/6] libnvdimm/bus: Prevent duplicate device_unregister() calls

2019-06-11 Thread Dan Williams
A multithreaded namespace creation/destruction stress test currently fails with signatures like the following: sysfs group 'power' not found for kobject 'dax1.1' RIP: 0010:sysfs_remove_group+0x76/0x80 Call Trace: device_del+0x73/0x370 device_unregister+0x16/0x50

[PATCH 0/6] libnvdimm: Fix async operations and locking

2019-06-11 Thread Dan Williams
The libnvdimm subsystem uses async operations to parallelize device probing operations and to allow sysfs to trigger device_unregister() on deleted namepsaces. A multithreaded stress test of the libnvdimm sysfs interface uncovered a case where device_unregister() is triggered multiple times, and

Re: [PATCH RFC 02/10] fs/locks: Export F_LAYOUT lease to user space

2019-06-11 Thread Ira Weiny
On Sun, Jun 09, 2019 at 09:00:24AM -0400, Jeff Layton wrote: > On Wed, 2019-06-05 at 18:45 -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > GUP longterm pins of non-pagecache file system pages (eg FS DAX) are > > currently disallowed because they are unsafe. > > > > The danger for

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

2019-06-11 Thread Brendan Higgins
On Tue, Jun 11, 2019 at 11:50 AM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-06-11 10:58:30) > > On Fri, Jun 07, 2019 at 12:00:47PM -0700, Stephen Boyd wrote: > > > Quoting Iurii Zaikin (2019-06-05 18:29:42) > > > > On Fri, May 17, 2019 at 11:22 AM Stephen Boyd wrote: > > > > > > > > >

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

2019-06-11 Thread Stephen Boyd
Quoting Brendan Higgins (2019-06-11 10:58:30) > On Fri, Jun 07, 2019 at 12:00:47PM -0700, Stephen Boyd wrote: > > Quoting Iurii Zaikin (2019-06-05 18:29:42) > > > On Fri, May 17, 2019 at 11:22 AM Stephen Boyd wrote: > > > > > > > > Quoting Brendan Higgins (2019-05-14 15:17:10) > > > > > diff

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

2019-06-11 Thread Brendan Higgins
On Fri, Jun 07, 2019 at 12:00:47PM -0700, Stephen Boyd wrote: > Quoting Iurii Zaikin (2019-06-05 18:29:42) > > On Fri, May 17, 2019 at 11:22 AM Stephen Boyd wrote: > > > > > > Quoting Brendan Higgins (2019-05-14 15:17:10) > > > > diff --git a/kernel/sysctl-test.c b/kernel/sysctl-test.c > > > >

Re: [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Mike Snitzer
On Tue, Jun 11 2019 at 12:37pm -0400, Pankaj Gupta wrote: > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > devices of device mapper support synchrononous DAX. If device > mapper consists of both synchronous and asynchronous dax devices, > we don't set 'DAXDEV_SYNC' flag. > >

Re: [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Cornelia Huck
On Tue, 11 Jun 2019 22:07:57 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range

[PATCH v12 7/7] xfs: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 9

[PATCH v12 6/7] ext4: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10 ++

[PATCH v12 5/7] dax: check synchronous mapping is supported

2019-06-11 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj

[PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. 'dm_table_supports_dax' is refactored to pass 'iterate_devices_fn' as

[PATCH v12 3/7] libnvdimm: add dax_dev sync flag

2019-06-11 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c| 2 +-

[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into

[PATCH v12 1/7] libnvdimm: nd_region flush callback support

2019-06-11 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host

[PATCH v12 0/7] virtio pmem driver

2019-06-11 Thread Pankaj Gupta
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 & VIRTIO patches. Device mapper change is also reviewed. Mike, Can you please provide ack for device mapper change i.e patch4. This version has changed implementation for patch

Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> > > Hi Mike, > > > > Thanks for the review Please find my reply inline. > > > > > > > > dm_table_supports_dax() is called multiple times (from > > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > > to have a getter have a side-effect of being a setter too.

Re: [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Mike Snitzer
On Tue, Jun 11 2019 at 9:10am -0400, Pankaj Gupta wrote: > Hi Mike, > > Thanks for the review Please find my reply inline. > > > > > dm_table_supports_dax() is called multiple times (from > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > to have a getter have a

Re: [PATCH v3 3/6] mm/nvdimm: Add page size and struct page size to pfn superblock

2019-06-11 Thread Jan Kara
On Tue 04-06-19 14:43:54, Aneesh Kumar K.V wrote: > This is needed so that we don't wrongly initialize a namespace > which doesn't have enough space reserved for holding struct pages > with the current kernel. > > We also increment PFN_MIN_VERSION to make sure that older kernel > won't initialize

Re: [PATCH v3 1/6] nvdimm: Consider probe return -EOPNOTSUPP as success

2019-06-11 Thread Aneesh Kumar K.V
Hi Dan, Any feedback on this? A change I would like to get done on top of this series is + if (__le16_to_cpu(pfn_sb->version_minor) < 3) { + /* +* For a large part we use PAGE_SIZE. But we +* do have some accounting code using SZ_4K. +

回复://薪酬设计与绩效考核873993

2019-06-11 Thread 孙经理
发件人: "孙经理";; 发送时间: 2019-6-11/ 17:09:19 收件人: "linux-nvdimm"; ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm