linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, Davidlohr Bueso <dave@stgolabs.net>,
	akpm@linux-foundation.org, Jan Kara <jack@suse.cz>,
	"Kirill A . Shutemov" <kirill@shutemov.name>,
	Michal Hocko <mhocko@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	haren@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com,
	khandual@linux.vnet.ibm.com, Paul.McKenney@us.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC 4/4] Change mmap_sem to range lock
Date: Thu, 20 Apr 2017 16:36:57 -0700	[thread overview]
Message-ID: <8737d2d52e.fsf@firstfloor.org> (raw)
In-Reply-To: <1492698500-24219-1-git-send-email-ldufour@linux.vnet.ibm.com> (Laurent Dufour's message of "Thu, 20 Apr 2017 16:28:20 +0200")

Laurent Dufour <ldufour@linux.vnet.ibm.com> writes:

> [resent this patch which seems to have not reached the mailing lists]
>
> Change the mmap_sem to a range lock to allow finer grain locking on
> the memory layout of a task.
>
> This patch rename mmap_sem into mmap_rw_tree to avoid confusion and
> replace any locking (read or write) by complete range locking.  So
> there is no functional change except in the way the underlying locking
> is achieved.
>
> Currently, this patch only supports x86 and PowerPc architectures,
> furthermore it should break the build of any others.

Thanks for working on this.

However as commented before I think the first step to make progress here
is a description of everything mmap_sem protects.

Surely the init full case could be done shorter with some wrapper
that combines the init_full and lock operation?

Then it would be likely a simple search'n'replace to move the
whole tree in one atomic step to the new wrappers.
Initially they could be just defined to use rwsems too to
not change anything at all.

It would be a good idea to merge such a patch as quickly
as possible beause it will be a nightmare to maintain
longer term.

Then you could add a config to use a range lock through
the wrappers.

Then after that you could add real ranges step by step,
after doing the proper analysis.

-Andi

  parent reply	other threads:[~2017-04-20 23:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 12:18 [RFC 0/4] Replace mmap_sem by a range lock Laurent Dufour
2017-04-19 12:18 ` [RFC 1/4] Add additional range parameter to GUP() and handle_page_fault() Laurent Dufour
2017-04-19 12:18 ` [RFC 2/4] Deactivate mmap_sem assert Laurent Dufour
2017-04-19 12:30   ` Peter Zijlstra
2017-04-19 13:45     ` Laurent Dufour
2017-04-19 13:54       ` Peter Zijlstra
2017-04-19 12:18 ` [RFC 3/4] Remove nest locking operation with mmap_sem Laurent Dufour
2017-04-19 12:18 ` [RFC 4/4] Change mmap_sem to range lock Laurent Dufour
2017-04-20 13:33 ` [RFC 0/4] Replace mmap_sem by a " Matthew Wilcox
2017-04-20 14:39   ` Laurent Dufour
2017-04-20 14:28 ` [RFC 4/4] Change mmap_sem to " Laurent Dufour
2017-04-20 14:37   ` Peter Zijlstra
2017-04-20 14:42     ` Laurent Dufour
2017-04-20 23:36   ` Andi Kleen [this message]
2017-04-24 15:47     ` 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=8737d2d52e.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=Paul.McKenney@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=dave@stgolabs.net \
    --cc=haren@linux.vnet.ibm.com \
    --cc=jack@suse.cz \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill@shutemov.name \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=peterz@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).