linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Minchan Kim <minchan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, John Dias <joaodias@google.com>,
	Tim Murray <timmurray@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>
Subject: Re: [PATCH v2] mm: don't be stuck to rmap lock on reclaim path
Date: Mon, 9 May 2022 11:54:49 -0700	[thread overview]
Message-ID: <20220509115449.f48559dd40a5e5ec95b8ead8@linux-foundation.org> (raw)
In-Reply-To: <20220509154710.4132957-1-minchan@kernel.org>

On Mon,  9 May 2022 08:47:10 -0700 Minchan Kim <minchan@kernel.org> wrote:

> The rmap locks(i_mmap_rwsem and anon_vma->root->rwsem) could be
> contented under memory pressure if processes keep working on
> their vmas(e.g., fork, mmap, munmap). It makes reclaim path
> stuck. In our real workload traces, we see kswapd is waiting the
> lock for 300ms+(a sec as worst case) and it makes other processes
> entering direct reclaim, which were also stuck on the lock.
> 
> This patch makes LRU aging path try_lock mode like shink_page_list
> so the reclaim context will keep working with next LRU pages
> without being stuck.
> 
> Since this patch introduces a new "contended" field as out-param
> along with try_lock in-param in rmap_walk_control, it's not
> immutable any longer if the try_lock is set so remove const
> keywords on rmap related functions. Since rmap walking is already
> expensive operation, I doubt the const would help sizable benefit(
> And we didn't have it until 5.17).

Some quantitative testing results would be helpful.  Demonstrate
the benefits of the patch?

  reply	other threads:[~2022-05-09 18:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 15:47 [PATCH v2] mm: don't be stuck to rmap lock on reclaim path Minchan Kim
2022-05-09 18:54 ` Andrew Morton [this message]
2022-05-10 16:52   ` Minchan Kim

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=20220509115449.f48559dd40a5e5ec95b8ead8@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=joaodias@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=surenb@google.com \
    --cc=timmurray@google.com \
    --cc=vdavydov.dev@gmail.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;
as well as URLs for NNTP newsgroup(s).