From: Peter Zijlstra <peterz@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: SeongJae Park <sj38.park@gmail.com>,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
linux-mm@kvack.org
Subject: Re: Re: Splitting the mmap_sem
Date: Thu, 6 Feb 2020 14:59:20 +0100 [thread overview]
Message-ID: <20200206135920.GS14914@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200109201320.GO6788@bombadil.infradead.org>
On Thu, Jan 09, 2020 at 12:13:20PM -0800, Matthew Wilcox wrote:
> One of the use cases that we're concerned about involves a high
> percentage of page faults on a single large (terabytes) VMA (and a
> highly multithreaded process). Moving the contention from a rwsem
> in the mm_struct to a refcount in the VMA will not help performance
> substantially for this user.
This is why I never believed in the VMA-refcount approach, and why my
patches used SRCU.
> The proposal consists of three phases. In phase 1, we convert the
> rbtree to the maple tree, and leave the locking alone. In phase 2,
> we change the locking to a per-VMA refcount, looked up under RCU.
>
> This problem arises during phase 3 where we attempt to handle page
> faults entirely under the RCU read lock. If we encounter problems,
> we can fall back to acquiring the VMA refcount, but we need the
> page allocation to fail rather than sleep (or magically drop the
> RCU lock and return an indication that it has done so, but that
> doesn't seem to be an approach that would find any favour).
So why not use SRCU? You can do full blocking faults under SRCU and
don't need no 'stinkin' refcounts ;-)
next prev parent reply other threads:[~2020-02-06 13:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 22:21 Matthew Wilcox
2019-12-05 17:21 ` Jerome Glisse
2019-12-06 5:13 ` Matthew Wilcox
2019-12-06 17:30 ` Jerome Glisse
2019-12-09 3:33 ` Matthew Wilcox
2019-12-09 14:17 ` Jerome Glisse
2019-12-10 15:26 ` Vlastimil Babka
2019-12-10 16:07 ` Jerome Glisse
2019-12-10 18:09 ` Vlastimil Babka
2019-12-12 14:24 ` Kirill A. Shutemov
2019-12-12 15:40 ` Matthew Wilcox
2019-12-12 15:46 ` Kirill A. Shutemov
2019-12-13 14:33 ` Matthew Wilcox
2019-12-13 18:06 ` Kirill A. Shutemov
2019-12-13 18:21 ` Matthew Wilcox
2020-01-06 22:09 ` Matthew Wilcox
2020-01-07 12:34 ` Kirill A. Shutemov
2020-01-07 13:54 ` Matthew Wilcox
2020-01-07 14:27 ` Kirill A. Shutemov
2020-01-09 13:56 ` Vlastimil Babka
2020-01-09 17:03 ` Michal Hocko
2020-01-09 17:07 ` Michal Hocko
2020-01-09 17:32 ` SeongJae Park
2020-01-09 20:13 ` Matthew Wilcox
2020-02-06 13:59 ` Peter Zijlstra [this message]
2020-02-06 20:15 ` Matthew Wilcox
2020-02-06 20:55 ` Peter Zijlstra
2020-02-06 21:20 ` Matthew Wilcox
2020-02-07 8:52 ` Peter Zijlstra
2020-02-10 22:00 ` Matthew Wilcox
2020-02-19 17:14 ` Laurent Dufour
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=20200206135920.GS14914@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=sj38.park@gmail.com \
--cc=vbabka@suse.cz \
--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