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: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-22 Thread Jeff Moyer
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 add a comment about avoidi

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

2019-04-22 Thread Dan Williams
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 add a comment about avoiding retpoline overhead here or >

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

2019-04-22 Thread Jeff Moyer
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 add a comment about avoiding retpoline overhead here or just >> > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so

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

2019-04-18 Thread Dan Williams
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 add a comment about avoiding retpoline overhead here or just > > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so that people > > > > don't >

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

2019-04-18 Thread Christoph Hellwig
On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > > > I'd either add a comment about avoiding retpoline overhead here or just > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so that people > > > don't > > > get confused by the code. > > > > Isn't this premature optimizat

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

2019-04-18 Thread Jeff Moyer
Dan Williams writes: > On Fri, Apr 12, 2019 at 6:12 AM Jeff Moyer wrote: >> >> Jan Kara writes: >> >> > 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: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Dan Williams
On Fri, Apr 12, 2019 at 6:12 AM Jeff Moyer wrote: > > Jan Kara writes: > > > 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)) > >> > + rc = -

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

2019-04-17 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)) > >> > + rc = -EIO; > >> > >> Given

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

2019-04-12 Thread Jeff Moyer
Jan Kara writes: > 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)) >> > + rc = -EIO; >> >> Given the common case wants to be fast and synchronous

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

2019-04-12 Thread Jan Kara
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)) > > + rc = -EIO; > > Given the common case wants to be fast and synchronous I think we > should try to

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

2019-04-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 f

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

2019-04-11 Thread Dan Williams
On Thu, Apr 11, 2019 at 9:02 AM Pankaj Gupta wrote: > > > > > > > > > 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 r

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

2019-04-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

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

2019-04-11 Thread Dan Williams
On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > > 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 register

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

2019-04-09 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 fsy