Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-28 Thread Dan Williams
On Fri, Feb 28, 2020 at 6:05 AM Christoph Hellwig wrote: > > On Thu, Feb 27, 2020 at 07:28:41PM -0800, Dan Williams wrote: > > "don't perform generic memory-error-handling, there's an fs that owns > > this daxdev and wants to disposition errors". The fs/dax.c > > infrastructure that sets up

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-28 Thread Christoph Hellwig
On Thu, Feb 27, 2020 at 07:28:41PM -0800, Dan Williams wrote: > "don't perform generic memory-error-handling, there's an fs that owns > this daxdev and wants to disposition errors". The fs/dax.c > infrastructure that sets up ->index and ->mapping would still need to > be there for ext4 until its

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-27 Thread Dan Williams
On Thu, Feb 27, 2020 at 5:31 PM Dave Chinner wrote: > On Wed, Feb 26, 2020 at 08:19:37PM -0800, Dan Williams wrote: [..] > > So you want the FS to have error handling for just pmem errors or all > > memory errors? > > Just pmem errors in the specific range the filesystem manages - we > really

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-27 Thread Dave Chinner
On Thu, Feb 27, 2020 at 10:25:17AM -0500, Vivek Goyal wrote: > On Thu, Feb 27, 2020 at 02:11:43PM +1100, Dave Chinner wrote: > > On Wed, Feb 26, 2020 at 11:57:56AM -0500, Vivek Goyal wrote: > > > On Tue, Feb 25, 2020 at 02:49:30PM -0800, Dan Williams wrote: > > > [..] > > > > > > I'm ok with

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-27 Thread Dave Chinner
On Wed, Feb 26, 2020 at 08:19:37PM -0800, Dan Williams wrote: > On Wed, Feb 26, 2020 at 7:03 PM Dave Chinner wrote: > > On Mon, Feb 24, 2020 at 10:38:44AM -0500, Vivek Goyal wrote: > > > Anyway, partial page truncate can't ensure that data in rest of the page > > > can > > > be read back

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-27 Thread Vivek Goyal
On Thu, Feb 27, 2020 at 02:11:43PM +1100, Dave Chinner wrote: > On Wed, Feb 26, 2020 at 11:57:56AM -0500, Vivek Goyal wrote: > > On Tue, Feb 25, 2020 at 02:49:30PM -0800, Dan Williams wrote: > > [..] > > > > > I'm ok with replacing blkdev_issue_zeroout() with a dax operation > > > > > callback

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Dan Williams
On Wed, Feb 26, 2020 at 7:03 PM Dave Chinner wrote: > > On Mon, Feb 24, 2020 at 10:38:44AM -0500, Vivek Goyal wrote: > > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > > > [..] > > > > > > Hi Jeff, > > > > > > > > > > > > New dax zeroing interface (dax_zero_page_range()) can

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Dave Chinner
On Wed, Feb 26, 2020 at 11:57:56AM -0500, Vivek Goyal wrote: > On Tue, Feb 25, 2020 at 02:49:30PM -0800, Dan Williams wrote: > [..] > > > > I'm ok with replacing blkdev_issue_zeroout() with a dax operation > > > > callback that deals with page aligned entries. That change at least > > > > makes

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Dave Chinner
On Mon, Feb 24, 2020 at 10:38:44AM -0500, Vivek Goyal wrote: > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > [..] > > > > > Hi Jeff, > > > > > > > > > > New dax zeroing interface (dax_zero_page_range()) can technically pass > > > > > a range which is less than a sector. Or

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Vivek Goyal
On Tue, Feb 25, 2020 at 02:49:30PM -0800, Dan Williams wrote: [..] > > > I'm ok with replacing blkdev_issue_zeroout() with a dax operation > > > callback that deals with page aligned entries. That change at least > > > makes the error boundary symmetric across copy_from_iter() and the > > >

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Jane Chu
On 2/24/2020 4:26 PM, Dan Williams wrote: On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: Dan Williams writes: Let's just focus on reporting errors when we know we have them. That's the problem in my eyes. If software needs to contend with latent error reporting then it should always

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-26 Thread Vivek Goyal
On Tue, Feb 25, 2020 at 02:49:30PM -0800, Dan Williams wrote: [..] > > > > Hi Dan, > > > > > > > > IIUC, block aligned hole punch don't go through __dax_zero_page_range() > > > > path. Instead they call blkdev_issue_zeroout() at later point of time. > > > > > > > > Only partial block zeroing path

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 12:08 PM Vivek Goyal wrote: > > On Tue, Feb 25, 2020 at 08:25:27AM -0800, Dan Williams wrote: > > On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > > > > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > > > > > [..] > > > > > > > Ok, how about if I

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 12:33 PM Jeff Moyer wrote: > > Dan Williams writes: > > > On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: > >> > >> Dan Williams writes: > >> > >> >> Let's just focus on reporting errors when we know we have them. > >> > > >> > That's the problem in my eyes. If

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Jeff Moyer
Dan Williams writes: > On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> >> Let's just focus on reporting errors when we know we have them. >> > >> > That's the problem in my eyes. If software needs to contend with >> > latent error reporting then it should

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Vivek Goyal
On Tue, Feb 25, 2020 at 08:25:27AM -0800, Dan Williams wrote: > On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > > > [..] > > > > > > Ok, how about if I add one more patch to the series which will check > > > > > > if

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > [..] > > > > > Ok, how about if I add one more patch to the series which will check > > > > > if unwritten portion of the page has known poison. If it has, then > > > > > -EIO

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Vivek Goyal
On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: [..] > > > > Ok, how about if I add one more patch to the series which will check > > > > if unwritten portion of the page has known poison. If it has, then > > > > -EIO is returned. > > > > > > > > > > > > Subject: pmem: zero page

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Dan Williams
On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: > > Dan Williams writes: > > >> Let's just focus on reporting errors when we know we have them. > > > > That's the problem in my eyes. If software needs to contend with > > latent error reporting then it should always contend otherwise > >

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Jeff Moyer
Dan Williams writes: >> Let's just focus on reporting errors when we know we have them. > > That's the problem in my eyes. If software needs to contend with > latent error reporting then it should always contend otherwise > software has multiple error models to wrangle. The only way for an

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Dan Williams
On Mon, Feb 24, 2020 at 1:17 PM Vivek Goyal wrote: > > On Mon, Feb 24, 2020 at 12:52:13PM -0800, Dan Williams wrote: > > On Mon, Feb 24, 2020 at 12:13 PM Vivek Goyal wrote: > > > > > > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > > > On Fri, Feb 21, 2020 at 03:17:59PM -0500,

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Vivek Goyal
On Mon, Feb 24, 2020 at 12:52:13PM -0800, Dan Williams wrote: > On Mon, Feb 24, 2020 at 12:13 PM Vivek Goyal wrote: > > > > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > > On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > > > > On Fri, Feb 21, 2020 at 01:32:48PM

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Dan Williams
On Mon, Feb 24, 2020 at 12:13 PM Vivek Goyal wrote: > > On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > > On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > > > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > > > Vivek Goyal writes: > > > > > > > > >

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Dan Williams
On Mon, Feb 24, 2020 at 5:50 AM Jeff Moyer wrote: > > Dan Williams writes: > > > On Sun, Feb 23, 2020 at 3:03 PM Dave Chinner wrote: > >> > >> On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > >> > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > >> > > Vivek Goyal

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Vivek Goyal
On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: > On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > > Vivek Goyal writes: > > > > > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > > >

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Vivek Goyal
On Mon, Feb 24, 2020 at 10:03:30AM +1100, Dave Chinner wrote: [..] > > > > Hi Jeff, > > > > > > > > New dax zeroing interface (dax_zero_page_range()) can technically pass > > > > a range which is less than a sector. Or which is bigger than a sector > > > > but start and end are not aligned on

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-24 Thread Jeff Moyer
Dan Williams writes: > On Sun, Feb 23, 2020 at 3:03 PM Dave Chinner wrote: >> >> On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: >> > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: >> > > Vivek Goyal writes: >> > > >> > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500,

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-23 Thread Dan Williams
On Sun, Feb 23, 2020 at 3:03 PM Dave Chinner wrote: > > On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > > Vivek Goyal writes: > > > > > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > > > >> Vivek

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-23 Thread Dave Chinner
On Fri, Feb 21, 2020 at 03:17:59PM -0500, Vivek Goyal wrote: > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > Vivek Goyal writes: > > > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > > >> Vivek Goyal writes: > > >> > > >> > Currently pmem_clear_poison()

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Jeff Moyer
Dan Williams writes: > Oh you misunderstood my comment, the "move badblocks to filesystem" > proposal is long term / down the road thing to consider. In the near > term this unaligned block zeroing facility is an improvement. I'm not sure I agree. I'm going to think about it and get back to

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Dan Williams
On Fri, Feb 21, 2020 at 1:25 PM Vivek Goyal wrote: > > On Fri, Feb 21, 2020 at 01:00:29PM -0800, Dan Williams wrote: > > On Fri, Feb 21, 2020 at 12:18 PM Vivek Goyal wrote: > > > > > > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > > > Vivek Goyal writes: > > > > > > > > > On

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Vivek Goyal
On Fri, Feb 21, 2020 at 01:00:29PM -0800, Dan Williams wrote: > On Fri, Feb 21, 2020 at 12:18 PM Vivek Goyal wrote: > > > > On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > > > Vivek Goyal writes: > > > > > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > > > >>

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-21 Thread Vivek Goyal
On Fri, Feb 21, 2020 at 01:32:48PM -0500, Jeff Moyer wrote: > Vivek Goyal writes: > > > On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > >> Vivek Goyal writes: > >> > >> > Currently pmem_clear_poison() expects offset and len to be sector > >> > aligned. > >> > Atleast that seems

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-20 Thread Vivek Goyal
On Thu, Feb 20, 2020 at 04:35:17PM -0500, Jeff Moyer wrote: > Vivek Goyal writes: > > > Currently pmem_clear_poison() expects offset and len to be sector aligned. > > Atleast that seems to be the assumption with which code has been written. > > It is called only from pmem_do_bvec() which is

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-20 Thread Jeff Moyer
Vivek Goyal writes: > Currently pmem_clear_poison() expects offset and len to be sector aligned. > Atleast that seems to be the assumption with which code has been written. > It is called only from pmem_do_bvec() which is called only from pmem_rw_page() > and pmem_make_request() which will only

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-20 Thread Christoph Hellwig
On Tue, Feb 18, 2020 at 04:48:35PM -0500, Vivek Goyal wrote: > Currently pmem_clear_poison() expects offset and len to be sector aligned. > Atleast that seems to be the assumption with which code has been written. > It is called only from pmem_do_bvec() which is called only from pmem_rw_page() >

[dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-18 Thread Vivek Goyal
Currently pmem_clear_poison() expects offset and len to be sector aligned. Atleast that seems to be the assumption with which code has been written. It is called only from pmem_do_bvec() which is called only from pmem_rw_page() and pmem_make_request() which will only passe sector aligned offset