linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY
@ 2019-04-25 23:22 Yang Shi
  2019-05-08 16:55 ` Yang Shi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yang Shi @ 2019-04-25 23:22 UTC (permalink / raw)
  To: josef, akpm; +Cc: yang.shi, linux-mm, linux-kernel

The commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking
operations") changed when mmap_sem is dropped during filemap page fault
and when returning VM_FAULT_RETRY.

Correct the comment to reflect the change.

Cc: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
---
 mm/filemap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index d78f577..f0d6250 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2545,10 +2545,8 @@ static struct file *do_async_mmap_readahead(struct vm_fault *vmf,
  *
  * vma->vm_mm->mmap_sem must be held on entry.
  *
- * If our return value has VM_FAULT_RETRY set, it's because
- * lock_page_or_retry() returned 0.
- * The mmap_sem has usually been released in this case.
- * See __lock_page_or_retry() for the exception.
+ * If our return value has VM_FAULT_RETRY set, it's because the mmap_sem
+ * may be dropped before doing I/O or by lock_page_maybe_drop_mmap().
  *
  * If our return value does not have VM_FAULT_RETRY set, the mmap_sem
  * has not been released.
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY
  2019-04-25 23:22 [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY Yang Shi
@ 2019-05-08 16:55 ` Yang Shi
  2019-05-14 22:50   ` Yang Shi
  2019-05-14 23:40 ` Song Liu
  2019-05-15 16:01 ` Josef Bacik
  2 siblings, 1 reply; 5+ messages in thread
From: Yang Shi @ 2019-05-08 16:55 UTC (permalink / raw)
  To: josef, akpm; +Cc: linux-mm, linux-kernel

Ping.


Josef, any comment on this one?


Thanks,

Yang



On 4/25/19 4:22 PM, Yang Shi wrote:
> The commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking
> operations") changed when mmap_sem is dropped during filemap page fault
> and when returning VM_FAULT_RETRY.
>
> Correct the comment to reflect the change.
>
> Cc: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
> ---
>   mm/filemap.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index d78f577..f0d6250 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2545,10 +2545,8 @@ static struct file *do_async_mmap_readahead(struct vm_fault *vmf,
>    *
>    * vma->vm_mm->mmap_sem must be held on entry.
>    *
> - * If our return value has VM_FAULT_RETRY set, it's because
> - * lock_page_or_retry() returned 0.
> - * The mmap_sem has usually been released in this case.
> - * See __lock_page_or_retry() for the exception.
> + * If our return value has VM_FAULT_RETRY set, it's because the mmap_sem
> + * may be dropped before doing I/O or by lock_page_maybe_drop_mmap().
>    *
>    * If our return value does not have VM_FAULT_RETRY set, the mmap_sem
>    * has not been released.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY
  2019-05-08 16:55 ` Yang Shi
@ 2019-05-14 22:50   ` Yang Shi
  0 siblings, 0 replies; 5+ messages in thread
From: Yang Shi @ 2019-05-14 22:50 UTC (permalink / raw)
  To: Yang Shi; +Cc: josef, Andrew Morton, Linux MM, Linux Kernel Mailing List

Hi Josef,

Any comment on this patch? I switched to my personal email since the
mail may get bounced back with my work email sometime.


On Wed, May 8, 2019 at 9:55 AM Yang Shi <yang.shi@linux.alibaba.com> wrote:
>
> Ping.
>
>
> Josef, any comment on this one?
>
>
> Thanks,
>
> Yang
>
>
>
> On 4/25/19 4:22 PM, Yang Shi wrote:
> > The commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking
> > operations") changed when mmap_sem is dropped during filemap page fault
> > and when returning VM_FAULT_RETRY.
> >
> > Correct the comment to reflect the change.
> >
> > Cc: Josef Bacik <josef@toxicpanda.com>
> > Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
> > ---
> >   mm/filemap.c | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index d78f577..f0d6250 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -2545,10 +2545,8 @@ static struct file *do_async_mmap_readahead(struct vm_fault *vmf,
> >    *
> >    * vma->vm_mm->mmap_sem must be held on entry.
> >    *
> > - * If our return value has VM_FAULT_RETRY set, it's because
> > - * lock_page_or_retry() returned 0.
> > - * The mmap_sem has usually been released in this case.
> > - * See __lock_page_or_retry() for the exception.
> > + * If our return value has VM_FAULT_RETRY set, it's because the mmap_sem
> > + * may be dropped before doing I/O or by lock_page_maybe_drop_mmap().
> >    *
> >    * If our return value does not have VM_FAULT_RETRY set, the mmap_sem
> >    * has not been released.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY
  2019-04-25 23:22 [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY Yang Shi
  2019-05-08 16:55 ` Yang Shi
@ 2019-05-14 23:40 ` Song Liu
  2019-05-15 16:01 ` Josef Bacik
  2 siblings, 0 replies; 5+ messages in thread
From: Song Liu @ 2019-05-14 23:40 UTC (permalink / raw)
  To: Yang Shi, jbacik; +Cc: josef, Andrew Morton, Linux-MM, open list

On Thu, Apr 25, 2019 at 4:22 PM Yang Shi <yang.shi@linux.alibaba.com> wrote:
>
> The commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking
> operations") changed when mmap_sem is dropped during filemap page fault
> and when returning VM_FAULT_RETRY.
>
> Correct the comment to reflect the change.
>
> Cc: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>

Looks good to me!

Acked-by: Song Liu <songliubraving@fb.com>

> ---
>  mm/filemap.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index d78f577..f0d6250 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2545,10 +2545,8 @@ static struct file *do_async_mmap_readahead(struct vm_fault *vmf,
>   *
>   * vma->vm_mm->mmap_sem must be held on entry.
>   *
> - * If our return value has VM_FAULT_RETRY set, it's because
> - * lock_page_or_retry() returned 0.
> - * The mmap_sem has usually been released in this case.
> - * See __lock_page_or_retry() for the exception.
> + * If our return value has VM_FAULT_RETRY set, it's because the mmap_sem
> + * may be dropped before doing I/O or by lock_page_maybe_drop_mmap().
>   *
>   * If our return value does not have VM_FAULT_RETRY set, the mmap_sem
>   * has not been released.
> --
> 1.8.3.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY
  2019-04-25 23:22 [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY Yang Shi
  2019-05-08 16:55 ` Yang Shi
  2019-05-14 23:40 ` Song Liu
@ 2019-05-15 16:01 ` Josef Bacik
  2 siblings, 0 replies; 5+ messages in thread
From: Josef Bacik @ 2019-05-15 16:01 UTC (permalink / raw)
  To: Yang Shi; +Cc: josef, akpm, linux-mm, linux-kernel

On Fri, Apr 26, 2019 at 07:22:11AM +0800, Yang Shi wrote:
> The commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking
> operations") changed when mmap_sem is dropped during filemap page fault
> and when returning VM_FAULT_RETRY.
> 
> Correct the comment to reflect the change.
> 
> Cc: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
> ---

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-15 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 23:22 [PATCH] mm: filemap: correct the comment about VM_FAULT_RETRY Yang Shi
2019-05-08 16:55 ` Yang Shi
2019-05-14 22:50   ` Yang Shi
2019-05-14 23:40 ` Song Liu
2019-05-15 16:01 ` Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).