linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mm: handle swap page faults if the faulting page can be locked
Date: Sat, 15 Apr 2023 08:34:28 +0800	[thread overview]
Message-ID: <20230415003428.997-1-hdanton@sina.com> (raw)
In-Reply-To: <CAJuCfpF2idZUjON6TZw4NV+himmACMGGE=2jgmt=fgAXv6L5Pg@mail.gmail.com>

On 14 Apr 2023 14:51:59 -0700 Suren Baghdasaryan <surenb@google.com>
> On Fri, Apr 14, 2023 at 1:32=E2=80=AFPM Matthew Wilcox <willy@infradead.org=
> >
> > If we simply sleep waiting for the
> > I/O, we make any mmap() operation _which touches this VMA_ wait for
> > the I/O to complete.  But I think that's OK, because new page faults
> > can continue to be serviced ... as long as they don't need to take
> > the mmap_lock.
> 
> Ok, so we will potentially block VMA writers for the duration of the I/O...
> Stupid question: why was this a bigger problem for mmap_lock?
> Potentially our address space can consist of only one anon VMA, so
> locking that VMA vs mmap_lock should be the same from swap pagefault
> POV. Maybe mmap_lock is taken for write in some other important cases
> when VMA lock is not needed?

This question adds a churn to my mind then after searching the git more
than 30 minutes commit 89b15332af7c ("mm: drop mmap_sem before calling
balance_dirty_pages() in write fault") rises. And John can tell you
more about it.


  reply	other threads:[~2023-04-15  0:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 18:00 Suren Baghdasaryan
2023-04-14 18:32 ` Suren Baghdasaryan
2023-04-14 18:43 ` Matthew Wilcox
2023-04-14 19:48   ` Suren Baghdasaryan
2023-04-14 20:31     ` Matthew Wilcox
2023-04-14 21:51       ` Suren Baghdasaryan
2023-04-15  0:34         ` Hillf Danton [this message]
2023-04-15  2:15         ` Matthew Wilcox
2023-04-17  0:49   ` Alistair Popple
2023-04-17 18:13     ` Suren Baghdasaryan
2023-04-17 23:33       ` Alistair Popple
2023-04-17 23:50         ` Suren Baghdasaryan
2023-04-18  1:07           ` Suren Baghdasaryan
2023-05-01 17:54             ` Suren Baghdasaryan

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=20230415003428.997-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=surenb@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox