Re: [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Pankaj Gupta
virtio patch 2 from Micahel. Thank you for all your help. Best regards, Pankaj Gupta > ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 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 +- drivers

[PATCH v8 4/6] dax: check synchronous mapping is supported

2019-05-10 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 v8 6/6] xfs: disable map_sync for async flush

2019-05-10 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 v8 5/6] ext4: disable map_sync for async flush

2019-05-10 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 v8 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 129 +++ drivers/nvdimm/virtio_pmem.c | 117 drivers/virtio/Kconfig | 10 +++ include/linux

[PATCH v8 1/6] libnvdimm: nd_region flush callback support

2019-05-10 Thread Pankaj Gupta
fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -- include

[PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Pankaj Gupta
_data' for long dereferencing - Remove virtio_pmem_freeze/restore functions - Remove BSD license text with SPDX license text - Add might_sleep() in virtio_pmem_flush - [Luiz] - Make spin_lock_irqsave() narrow Pankaj Gupta (6): libnvdimm: nd_region flush callback support virtio-pmem: Add

Re: [PATCH v7 3/6] libnvdimm: add dax_dev sync flag

2019-05-09 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. > > > >

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
> > > > > +int virtio_pmem_flush(struct nd_region *nd_region) > > > +{ > > > +int err; > > > +unsigned long flags; > > > +struct scatterlist *sgs[2], sg, ret; > > > +struct virtio_device *vdev = nd_region->provider_data; > > > +struct virtio_pmem *vpmem =

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
> > On 4/25/19 10:00 PM, Pankaj Gupta wrote: > > > +void host_ack(struct virtqueue *vq) > > +{ > > + unsigned int len; > > + unsigned long flags; > > + struct virtio_pmem_request *req, *req_buf; > > + struct virtio_pmem *vpmem = vq

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
Hi Dan, Thank you for the review. Please see my reply inline. > > Hi Pankaj, > > Some minor file placement comments below. Sure. > > On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > > > This patch adds virtio-pmem driver for KVM guest. > > &

Re: [Qemu-devel] [PATCH v7 6/6] xfs: disable map_sync for async flush

2019-05-07 Thread Pankaj Gupta
> > On Tue, May 07, 2019 at 08:37:01AM -0700, Dan Williams wrote: > > On Thu, Apr 25, 2019 at 10:03 PM Pankaj Gupta wrote: > > > > > > Dont support 'MAP_SYNC' with non-DAX files and DAX files > > > with asynchronous dax_device. Virtio pmem provides &

Re: [Qemu-devel] [PATCH v7 4/6] dax: check synchronous mapping is supported

2019-05-07 Thread Pankaj Gupta
> > From: Pankaj Gupta > Date: Thu, Apr 25, 2019 at 10:00 PM > > > +static inline bool daxdev_mapping_supported(struct vm_area_struct *vma, > > + struct dax_device *dax_dev) > > +{ > > + return !(vma->flags & V

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-04-30 Thread Pankaj Gupta
> > On Fri, Apr 26, 2019 at 10:30:35AM +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

[PATCH v7 6/6] xfs: disable map_sync for async flush

2019-04-25 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 --- fs/xfs/xfs_file.c | 9 ++--- 1 file changed, 6

[PATCH v7 4/6] dax: check synchronous mapping is supported

2019-04-25 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 v7 5/6] ext4: disable map_sync for async flush

2019-04-25 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 v7 3/6] libnvdimm: add dax_dev sync flag

2019-04-25 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 +- drivers

[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-04-25 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 114 + drivers/virtio/Kconfig | 10 +++ drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 118 +++ include/linux/virtio_pmem.h | 60

[PATCH v7 1/6] libnvdimm: nd_region flush callback support

2019-04-25 Thread Pankaj Gupta
fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -- include

[PATCH v7 0/6] virtio pmem driver

2019-04-25 Thread Pankaj Gupta
ry information with nvdimm_bus and create region_type accordingly. - Call VIRTIO flush from existing pmem driver. Pankaj Gupta (6): libnvdimm: nd_region flush callback support virtio-pmem: Add virtio-pmem guest driver libnvdimm: add nd_region buffered dax_dev flag dax: check synchr

Re: [Qemu-devel] [PATCH v6 5/6] ext4: disable map_sync for async flush

2019-04-23 Thread Pankaj Gupta
> > On Tue 23-04-19 13:36:11, Pankaj Gupta wrote: > > 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

Re: [Qemu-devel] [PATCH v6 6/6] xfs: disable map_sync for async flush

2019-04-23 Thread Pankaj Gupta
> > On Wed, Apr 24, 2019 at 08:02:17AM +1000, Dave Chinner wrote: > > On Tue, Apr 23, 2019 at 01:36:12PM +0530, Pankaj Gupta wrote: > > > Dont support 'MAP_SYNC' with non-DAX files and DAX files > > > with asynchronous dax_device. Virtio pmem provides > >

Re: [PATCH v6 6/6] xfs: disable map_sync for async flush

2019-04-23 Thread Pankaj Gupta
> > On Tue, Apr 23, 2019 at 01:36:12PM +0530, Pankaj Gupta wrote: > > 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_

[PATCH v6 6/6] xfs: disable map_sync for async flush

2019-04-23 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 --- fs/xfs/xfs_file.c | 10 ++ 1 file changed, 6

[PATCH v6 5/6] ext4: disable map_sync for async flush

2019-04-23 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 --- fs/ext4/file.c | 11 ++- 1 file changed, 6

[PATCH v6 3/6] libnvdimm: add dax_dev sync flag

2019-04-23 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 +- drivers

[PATCH v6 4/6] dax: check synchronous mapping is supported

2019-04-23 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 v6 2/6] virtio-pmem: Add virtio pmem driver

2019-04-23 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 114 + drivers/virtio/Kconfig | 10 +++ drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 118 +++ include/linux/virtio_pmem.h | 60

[PATCH v6 0/6] virtio pmem driver

2019-04-23 Thread Pankaj Gupta
ons instead of creating an entirely new block driver. - Use VIRTIO driver to register memory information with nvdimm_bus and create region_type accordingly. - Call VIRTIO flush from existing pmem driver. Pankaj Gupta (6): libnvdimm: nd_region flush callback support virtio-pmem: Add virti

[PATCH v6 1/6] libnvdimm: nd_region flush callback support

2019-04-23 Thread Pankaj Gupta
fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -- include

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Pankaj Gupta
> > Dan Williams writes: > > > On Mon, Apr 22, 2019 at 8:59 AM Jeff Moyer wrote: > >> > >> Dan Williams writes: > >> > >> > On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig > >> > wrote: > >> >> > >> >> On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > >> >> > > > I'd either

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Pankaj Gupta
Hello, Thank you for the suggestions on this. > > > On Thu 11-04-19 07:51:48, Dan Williams wrote: > >> On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > >> > + } else { > >> > + if (nd_region->flush(nd_region)) > >>

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-11 Thread Pankaj Gupta
types we are registering > > > > existing flush function. Report error returned by host fsync > > > > failure to userspace. > > > > > > > > This also handles asynchronous flush requests from the block layer > > > > by creating a chil

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-11 Thread Pankaj Gupta
ng > > existing flush function. Report error returned by host fsync > > failure to userspace. > > > > This also handles asynchronous flush requests from the block layer > > by creating a child bio and chaining it with parent bio. > > > > Signed-off-by: Pankaj Gup

Re: [PATCH v5 3/6] libnvdimm: add dax_dev sync flag

2019-04-11 Thread Pankaj Gupta
t; synchronous flush. > > > > Signed-off-by: Pankaj Gupta > > --- > > drivers/dax/bus.c| 2 +- > > drivers/dax/super.c | 13 - > > drivers/md/dm.c | 2 +- > > drivers/nvdimm/pmem.c| 3 ++- >

Re: [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver

2019-04-10 Thread Pankaj Gupta
; > capable filesystems. > > > > > > This also provides function to perform guest flush over > > > VIRTIO from 'pmem' driver when userspace performs flush > > > on DAX memory range. > > > > > > Signed-off-by: Pankaj Gupta > >

Re: [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver

2019-04-10 Thread Pankaj Gupta
provides function to perform guest flush over > > VIRTIO from 'pmem' driver when userspace performs flush > > on DAX memory range. > > > > Signed-off-by: Pankaj Gupta > > --- > > drivers/nvdimm/virtio_pmem.c | 88 ++ > >

Re: [Qemu-devel] [PATCH v5 2/5] virtio-pmem: Add virtio pmem driver

2019-04-10 Thread Pankaj Gupta
> > On Wed, Apr 10, 2019 at 09:38:22AM +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

Re: [PATCH v5 3/6] libnvdimm: add dax_dev sync flag

2019-04-10 Thread Pankaj Gupta
> > On Wed 10-04-19 09:38:23, Pankaj Gupta wrote: > > @@ -64,6 +65,10 @@ static inline bool dax_write_cache_enabled(struct > > dax_device *dax_dev) > > { > > return false; > > } > > +static inline bool dax_synchronous(struct dax_d

Re: [PATCH v5 4/6] dax: check synchronous mapping is supported

2019-04-10 Thread Pankaj Gupta
NC. > > > > Suggested-by: Jan Kara > > Signed-off-by: Pankaj Gupta > > --- > > include/linux/dax.h | 23 +++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/include/linux/dax.h b/include/linux/dax.h > > index b89

[PATCH v5 6/6] xfs: disable map_sync for async flush

2019-04-09 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 --- fs/xfs/xfs_file.c | 10 ++ 1 file changed, 6

[PATCH v5 5/6] ext4: disable map_sync for async flush

2019-04-09 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 --- fs/ext4/file.c | 11 ++- 1 file changed, 6

[PATCH v5 4/6] dax: check synchronous mapping is supported

2019-04-09 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 v5 3/6] libnvdimm: add dax_dev sync flag

2019-04-09 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 +- drivers

[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver

2019-04-09 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 88 ++ drivers/virtio/Kconfig | 10 +++ drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 124 +++ include/linux/virtio_pmem.h | 60

[PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-09 Thread Pankaj Gupta
fsync failure to userspace. This also handles asynchronous flush requests from the block layer by creating a child bio and chaining it with parent bio. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h

[PATCH v5 0/6] virtio pmem driver

2019-04-09 Thread Pankaj Gupta
y information with nvdimm_bus and create region_type accordingly. - Call VIRTIO flush from existing pmem driver. Pankaj Gupta (6): libnvdimm: nd_region flush callback support virtio-pmem: Add virtio-pmem guest driver libnvdimm: add nd_region buffered dax_dev flag dax: check synchronous ma

Re: [Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > > > > > So I would put the helper in include/linux/dax.h and have it like: > > > > > > bool daxdev_mapping_supported(struct vm_area_struct *vma, > > Should this be static inline if you're putting it in the header file? yes. Thanks. > > A comment ought to be added to describe what this

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 02:12:30AM -0400, Pankaj Gupta wrote: > > > All this ad hoc IS_DAX conditional logic is getting pretty nasty. > > > > > > xfs_file_mmap( > > > > > > { > > > struct inode*inode =

Re: [Qemu-devel] [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> On Thu 04-04-19 05:09:10, Pankaj Gupta wrote: > > > > > > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > > > Virtio pmem provides asynchronous

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > > Virtio pmem provides asynchronous host page cache flush > > > > mechanism. we don't support 'MAP

Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver

2019-04-04 Thread Pankaj Gupta
> > > > > Subject: Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem > > > driver > > > > > > On Wed, Apr 03, 2019 at 04:10:15PM +0530, Pankaj Gupta wrote: > > > > This patch adds virtio-pmem driver for KVM guest. > > >

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
> > On Thu, Apr 04, 2019 at 09:09:12AM +1100, Dave Chinner wrote: > > On Wed, Apr 03, 2019 at 04:10:18PM +0530, Pankaj Gupta wrote: > > > Virtio pmem provides asynchronous host page cache flush > > > mechanism. we don't support 'MAP_SYNC' with virtio pmem > >

Re: [PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-04 Thread Pankaj Gupta
Hi Dave, > > 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 > > --- > > fs/xfs/xfs_file.c | 8 > > 1 file chang

Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver

2019-04-03 Thread Pankaj Gupta
> Subject: Re: [Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver > > On Wed, Apr 03, 2019 at 04:10:15PM +0530, Pankaj Gupta wrote: > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range informatio

[PATCH v4 5/5] xfs: disable map_sync for async flush

2019-04-03 Thread Pankaj Gupta
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 --- fs/xfs/xfs_file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 1f2e2845eb76

[PATCH v4 4/5] ext4: disable map_sync for async flush

2019-04-03 Thread Pankaj Gupta
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 --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v4 1/5] ibnvdimm: nd_region flush callback support

2019-04-03 Thread Pankaj Gupta
fsync failure to userspace. This also handles asynchronous flush requests from the block layer by creating a child bio and chaining it with parent bio. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h

[PATCH v4 3/5] libnvdimm: add dax_dev sync flag

2019-04-03 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 +- drivers

[PATCH v4 2/5] virtio-pmem: Add virtio pmem driver

2019-04-03 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 84 + drivers/virtio/Kconfig | 10 +++ drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 125 +++ include/linux/virtio_pmem.h | 60

[PATCH v4 0/5] virtio pmem driver

2019-04-03 Thread Pankaj Gupta
of creating an entirely new block driver. - Use VIRTIO driver to register memory information with nvdimm_bus and create region_type accordingly. - Call VIRTIO flush from existing pmem driver. Pankaj Gupta (5): libnvdimm: nd_region flush callback support virtio-pmem: Add virtio-pmem gue

[PATCH] virtio_console: initialize vtermno value for ports

2019-03-19 Thread Pankaj Gupta
ports to '1' and regular serial ports are initiaized to '0'. Reported-by: si...@redhat.com Signed-off-by: Pankaj Gupta --- drivers/char/virtio_console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index

Re: [PATCH] virtio_console: free unused buffers with virtio port

2019-03-11 Thread Pankaj Gupta
> > > > Hello Michael, > > > > Thanks for your reply. > > > > > > > > On Mon, Mar 04, 2019 at 06:35:11PM +0530, Pankaj Gupta wrote: > > > > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset") >

Re: [PATCH] virtio_console: free unused buffers with virtio port

2019-03-10 Thread Pankaj Gupta
nkaj > > Reported-by: Xiaohui Li > Fixes: b3258ff1d6 ("virtio_console: free buffers after reset") > Signed-off-by: Pankaj Gupta > --- > drivers/char/virtio_console.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/drivers

Re: [PATCH] virtio_console: free unused buffers with virtio port

2019-03-04 Thread Pankaj Gupta
Hello Michael, Thanks for your reply. > > On Mon, Mar 04, 2019 at 06:35:11PM +0530, Pankaj Gupta wrote: > > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset") > > deffered detaching of unused buffer to virtio device unplug time. > >

Re: [PATCH] virtio_console: free unused buffers with virtio port

2019-03-04 Thread Pankaj Gupta
. > This is the best we can do as we cannot call device_reset because virtio > device is still active. This was the working behaviour before the change > introduced in commit b3258ff1d6. > > Reported-by: Xiaohui Li > Fixes: b3258ff1d6 ("virtio_console: free buf

[PATCH] virtio_console: free unused buffers with virtio port

2019-03-04 Thread Pankaj Gupta
vice is still active. This was the working behaviour before the change introduced in commit b3258ff1d6. Reported-by: Xiaohui Li Fixes: b3258ff1d6 ("virtio_console: free buffers after reset") Signed-off-by: Pankaj Gupta --- drivers/char/virtio_console.c | 14 +++--- 1 fil

Re: [Qemu-devel] security implications of caching with virtio pmem (was Re: [PATCH v3 0/5] kvm "virtio pmem" device)

2019-02-12 Thread Pankaj Gupta
Hi Michael, Thanks for looking into this and summarizing in detail. > > This patch series has implementation for "virtio pmem". > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > which allows to bypass the guest page cache. This also > > implements a VIRTIO based

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > Right. Thinking about this I would be more concerned about the fact > > > > > that > > > > > guest can effectively pin amount of host's page cache upto size of > > > > > the > > > > > device/file passed to guest as PMEM, can't it Pankaj? Or is there > > > > > some > > > > > QEMU > > >

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > Until you have images (and hence host page cache) shared between > > multiple guests. People will want to do this, because it means they > > only need a single set of pages in host memory for executable > > binaries rather than a set of pages per guest. Then you have > > multiple guests

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > > > > > > > > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > > > This patch series has implementation for "virtio pmem". > > &

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > On Thu 10-01-19 12:26:17, Dave Chinner wrote: > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > > This patch series has implementation for "virtio pmem". > > > "virtio pmem" is fake persistent memory(nvdimm) in guest

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > This patch series has implementation for "virtio pmem". > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > which allows to bypass the guest page cache. This also

Re: [PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-16 Thread Pankaj Gupta
vides function to perform guest flush over > > VIRTIO from 'pmem' driver when userspace performs flush > > on DAX memory range. > > > > Signed-off-by: Pankaj Gupta > > --- > > drivers/nvdimm/virtio_pmem.c | 84 ++ > > dr

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > > > > > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > > multiple guests. People will want

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-16 Thread Pankaj Gupta
> > > On Mon, Jan 14, 2019 at 02:15:40AM -0500, Pankaj Gupta wrote: > > > > > > > > > > Until you have images (and hence host page cache) shared between > > > > > > multiple guests. People will want to do this, because it means they &

Re: [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_BUFFERED' flag which is set > > for virtio pmem corresponding nd_region. This later > > is used to disable MAP_SYNC functionality for ext4 > > & xfs filesystem. > > > > Signed-off-by: Pankaj Gupta

Re: [PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > On Wed 09-01-19 19:26:05, Pankaj Gupta wrote: > > 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 > ... > > @@ -371,6 +37

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/xfs/xfs_file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

[PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c

[PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
ove extra header files & add licensing - Stefan Changes from RFC v1: - Reuse existing 'pmem' code for registering persistent memory and other operations instead of creating an entirely new block driver. - Use VIRTIO driver to register memory information with nvdimm_bus and create region_t

[PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-09 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 84 ++ drivers/virtio/Kconfig | 10 drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 124 +++ include/linux/virtio_pmem.h

[PATCH v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 Thread Pankaj Gupta
fsync failure to userspace. This also handles asynchronous flush requests from the block layer by creating a child bio and chaining it with parent bio. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
flush completion function with proper locking and wait > for host side flush completion - Stefan & Dan > - Keep userspace API in uapi header file - Stefan, MST > - Use LE fields & New device id - MST > - Indentation & spacing suggestions - MST & Eric > - Remove extra hea

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/xfs/xfs_file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

Re: [PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > 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 > > --- > > fs/xfs/xfs_file.c | 8 > > 1 file changed, 8 insertions

[PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
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 --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c

[PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-09 Thread Pankaj Gupta
. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/virtio_pmem.c | 84 ++ drivers/virtio/Kconfig | 10 drivers/virtio/Makefile | 1 + drivers/virtio/pmem.c| 124 +++ include/linux/virtio_pmem.h

[PATCH v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 Thread Pankaj Gupta
fsync failure to userspace. This also handles asynchronous flush requests from the block layer by creating a child bio and chaining it with parent bio. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h

[PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
ove extra header files & add licensing - Stefan Changes from RFC v1: - Reuse existing 'pmem' code for registering persistent memory and other operations instead of creating an entirely new block driver. - Use VIRTIO driver to register memory information with nvdimm_bus and create region_t

Re: [PATCH v24 1/2] mm: support reporting free page blocks

2018-01-25 Thread Pankaj Gupta
> > On Wed, Jan 24, 2018 at 06:42:41PM +0800, Wei Wang wrote: > > This patch adds support to walk through the free page blocks in the > > system and report them via a callback function. Some page blocks may > > leave the free list after zone->lock is released, so it is the caller's > >

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Pankaj Gupta
> On 01/17/2018 04:21 PM, Pankaj Gupta wrote: > >> Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_VQ feature indicates the > >> support of reporting hints of guest free pages to host via virtio-balloon. > >> > >> Host requests the guest to report

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Pankaj Gupta
> > Negotiation of the VIRTIO_BALLOON_F_FREE_PAGE_VQ feature indicates the > support of reporting hints of guest free pages to host via virtio-balloon. > > Host requests the guest to report free pages by sending a new cmd > id to the guest via the free_page_report_cmd_id configuration register.

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-27 Thread Pankaj Gupta
> > On Tue, Sep 26, 2017 at 02:36:57AM -0400, Pankaj Gupta wrote: > > > > > > > > A bit late to a party, but: > > > > > > On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong <ak...@redhat.com> wrote: > > > > From: Rusty Russell &l

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-26 Thread Pankaj Gupta
> > A bit late to a party, but: > > On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong wrote: > > From: Rusty Russell > > > > There's currently a big lock around everything, and it means that we > > can't query sysfs (eg

Re: [PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2017-08-03 Thread Pankaj Gupta
> > On 08/03/2017 04:13 PM, Pankaj Gupta wrote: > >> > >> +/* Allocate space for find_vqs parameters */ > >> +vqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL); > >> +if (!vqs) > >> +goto err_vq; > >>

<    1   2   3   >