Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Dan Williams
On Wed, Mar 24, 2021 at 10:39 AM Christoph Hellwig wrote: > > On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote: > > > Eww. As I said I think the right way is that the file system (or > > > other consumer) can register a set of callbacks for opening the device. > > > > How does that so

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Christoph Hellwig
On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote: > > Eww. As I said I think the right way is that the file system (or > > other consumer) can register a set of callbacks for opening the device. > > How does that solve the problem of the driver being notified of all > pfn failure even

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Dan Williams
On Wed, Mar 24, 2021 at 12:48 AM Christoph Hellwig wrote: > > On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote: > > So I think the path forward is: > > > > - teach memory_failure() to allow for ranged failures > > > > - let interested drivers register for memory failure events via a >

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote: > So I think the path forward is: > > - teach memory_failure() to allow for ranged failures > > - let interested drivers register for memory failure events via a > blocking_notifier_head Eww. As I said I think the right way is that t

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-23 Thread Dan Williams
On Thu, Mar 18, 2021 at 7:18 PM ruansy.f...@fujitsu.com wrote: > > > > > -Original Message- > > From: ruansy.f...@fujitsu.com > > Subject: RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > > > > > > > > > > >

RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-18 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: ruansy.f...@fujitsu.com > Subject: RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > > > > > > > > > > > After the conversation with Dave I don't see the point of this. > > > >

RE: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-12 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Dan Williams > Subject: Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() > > On Mon, Mar 8, 2021 at 3:34 AM ruansy.f...@fujitsu.com > wrote: > > > > > > 1 file changed, 8 insertions(+) > > &

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-08 Thread Dan Williams
On Mon, Mar 8, 2021 at 3:34 AM ruansy.f...@fujitsu.com wrote: > > > > > 1 file changed, 8 insertions(+) > > > > > > > > > > diff --git a/include/linux/memremap.h b/include/linux/memremap.h > > > > > index 79c49e7f5c30..0bcf2b1e20bd 100644 > > > > > --- a/include/linux/memremap.h > > > > > +++ b/i

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-08 Thread ruansy.f...@fujitsu.com
> > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/include/linux/memremap.h b/include/linux/memremap.h > > > > index 79c49e7f5c30..0bcf2b1e20bd 100644 > > > > --- a/include/linux/memremap.h > > > > +++ b/include/linux/memremap.h > > > > @@ -87,6 +87,14 @@ struct dev_pagemap_ops {

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-07 Thread Dan Williams
On Sun, Mar 7, 2021 at 7:38 PM ruansy.f...@fujitsu.com wrote: > > > On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan > > wrote: > > > > > > When memory-failure occurs, we call this function which is implemented > > > by each kind of devices. For the fsdax case, pmem device driver > > > implements it

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-07 Thread ruansy.f...@fujitsu.com
> On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan > wrote: > > > > When memory-failure occurs, we call this function which is implemented > > by each kind of devices. For the fsdax case, pmem device driver > > implements it. Pmem device driver will find out the block device where > > the error page

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-06 Thread Dan Williams
On Mon, Feb 8, 2021 at 2:55 AM Shiyang Ruan wrote: > > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page locates in, an

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:20PM +0800, Shiyang Ruan wrote: > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page locate

[PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-02-08 Thread Shiyang Ruan
When memory-failure occurs, we call this function which is implemented by each kind of devices. For the fsdax case, pmem device driver implements it. Pmem device driver will find out the block device where the error page locates in, and try to get the filesystem on this block device. And finally