All of lore.kernel.org
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	Matthew Wilcox <willy@infradead.org>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] dax: Change return type to vm_fault_t
Date: Mon, 16 Apr 2018 22:08:01 +0530	[thread overview]
Message-ID: <CAFqt6zZpPTY0mX5d9NVJ=imBkFw+1yVEDvo0OVKhBpZaYn0vAw@mail.gmail.com> (raw)
In-Reply-To: <e20daa13-b756-8e8e-c98c-22030fb0a5f8@infradead.org>

On Mon, Apr 16, 2018 at 9:59 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 04/16/2018 09:14 AM, Dan Williams wrote:
>> On Sat, Apr 14, 2018 at 8:50 AM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>>> Use new return type vm_fault_t for fault and
>>> huge_fault handler.
>>>
>>> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>>> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>>> ---
>>>  drivers/dax/device.c | 26 +++++++++++---------------
>>>  1 file changed, 11 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/dax/device.c b/drivers/dax/device.c
>>> index 2137dbc..a122701 100644
>>> --- a/drivers/dax/device.c
>>> +++ b/drivers/dax/device.c
>>> @@ -243,11 +243,11 @@ __weak phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff,
>>>         return -1;
>>>  }
>>>
>>> -static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
>>> +static vm_fault_t __dev_dax_pte_fault(struct dev_dax *dev_dax,
>>> +                               struct vm_fault *vmf)
>>>  {
>>>         struct device *dev = &dev_dax->dev;
>>>         struct dax_region *dax_region;
>>> -       int rc = VM_FAULT_SIGBUS;
>>>         phys_addr_t phys;
>>>         pfn_t pfn;
>>>         unsigned int fault_size = PAGE_SIZE;
>>> @@ -274,17 +274,11 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
>>>
>>>         pfn = phys_to_pfn_t(phys, dax_region->pfn_flags);
>>>
>>> -       rc = vm_insert_mixed(vmf->vma, vmf->address, pfn);
>>> -
>>> -       if (rc == -ENOMEM)
>>> -               return VM_FAULT_OOM;
>>> -       if (rc < 0 && rc != -EBUSY)
>>> -               return VM_FAULT_SIGBUS;
>>> -
>>> -       return VM_FAULT_NOPAGE;
>>> +       return vmf_insert_mixed(vmf->vma, vmf->address, pfn);
>>
>> Ugh, so this change to vmf_insert_mixed() went upstream without fixing
>> the users? This changelog is now misleading as it does not mention
>> that is now an urgent standalone fix. On first read I assumed this was
>> part of a wider effort for 4.18.
>>
>> Grumble, we'll get this applied with a 'Fixes: 1c8f422059ae ("mm:
>> change return type to vm_fault_t")' tag.
>>
>
> Thanks for that explanation. The patch description is missing any kind
> of "why" (justification).

ok, I will send v2 with description.

>
>
> --
> ~Randy
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Souptick Joarder <jrdr.linux@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	Matthew Wilcox <willy@infradead.org>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH] dax: Change return type to vm_fault_t
Date: Mon, 16 Apr 2018 22:08:01 +0530	[thread overview]
Message-ID: <CAFqt6zZpPTY0mX5d9NVJ=imBkFw+1yVEDvo0OVKhBpZaYn0vAw@mail.gmail.com> (raw)
In-Reply-To: <e20daa13-b756-8e8e-c98c-22030fb0a5f8@infradead.org>

On Mon, Apr 16, 2018 at 9:59 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 04/16/2018 09:14 AM, Dan Williams wrote:
>> On Sat, Apr 14, 2018 at 8:50 AM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>>> Use new return type vm_fault_t for fault and
>>> huge_fault handler.
>>>
>>> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>>> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>>> ---
>>>  drivers/dax/device.c | 26 +++++++++++---------------
>>>  1 file changed, 11 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/dax/device.c b/drivers/dax/device.c
>>> index 2137dbc..a122701 100644
>>> --- a/drivers/dax/device.c
>>> +++ b/drivers/dax/device.c
>>> @@ -243,11 +243,11 @@ __weak phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff,
>>>         return -1;
>>>  }
>>>
>>> -static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
>>> +static vm_fault_t __dev_dax_pte_fault(struct dev_dax *dev_dax,
>>> +                               struct vm_fault *vmf)
>>>  {
>>>         struct device *dev = &dev_dax->dev;
>>>         struct dax_region *dax_region;
>>> -       int rc = VM_FAULT_SIGBUS;
>>>         phys_addr_t phys;
>>>         pfn_t pfn;
>>>         unsigned int fault_size = PAGE_SIZE;
>>> @@ -274,17 +274,11 @@ static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
>>>
>>>         pfn = phys_to_pfn_t(phys, dax_region->pfn_flags);
>>>
>>> -       rc = vm_insert_mixed(vmf->vma, vmf->address, pfn);
>>> -
>>> -       if (rc == -ENOMEM)
>>> -               return VM_FAULT_OOM;
>>> -       if (rc < 0 && rc != -EBUSY)
>>> -               return VM_FAULT_SIGBUS;
>>> -
>>> -       return VM_FAULT_NOPAGE;
>>> +       return vmf_insert_mixed(vmf->vma, vmf->address, pfn);
>>
>> Ugh, so this change to vmf_insert_mixed() went upstream without fixing
>> the users? This changelog is now misleading as it does not mention
>> that is now an urgent standalone fix. On first read I assumed this was
>> part of a wider effort for 4.18.
>>
>> Grumble, we'll get this applied with a 'Fixes: 1c8f422059ae ("mm:
>> change return type to vm_fault_t")' tag.
>>
>
> Thanks for that explanation. The patch description is missing any kind
> of "why" (justification).

ok, I will send v2 with description.

>
>
> --
> ~Randy

  reply	other threads:[~2018-04-16 16:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-14 15:50 [PATCH] dax: Change return type to vm_fault_t Souptick Joarder
2018-04-16 16:14 ` Dan Williams
2018-04-16 16:14   ` Dan Williams
2018-04-16 16:29   ` Randy Dunlap
2018-04-16 16:29     ` Randy Dunlap
2018-04-16 16:38     ` Souptick Joarder [this message]
2018-04-16 16:38       ` Souptick Joarder
2018-04-16 17:47   ` Matthew Wilcox
2018-04-16 18:00     ` Dan Williams
2018-04-16 18:00       ` Dan Williams
2018-04-16 18:21       ` Matthew Wilcox
2018-04-16 18:28         ` Souptick Joarder
2018-04-16 18:28           ` Souptick Joarder
2018-04-16 18:35           ` Dan Williams
2018-04-16 18:37             ` Souptick Joarder
2018-04-16 18:41               ` Randy Dunlap
2018-04-16 18:41                 ` Randy Dunlap
2018-04-17  0:14   ` Theodore Y. Ts'o
2018-04-17  0:14     ` Theodore Y. Ts'o
2018-04-17  0:19     ` Matthew Wilcox
2018-04-17  0:19       ` Matthew Wilcox
2018-04-17  4:08       ` Dan Williams
2018-04-17  4:08         ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFqt6zZpPTY0mX5d9NVJ=imBkFw+1yVEDvo0OVKhBpZaYn0vAw@mail.gmail.com' \
    --to=jrdr.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.