From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: linux-mm@kvack.org
Cc: 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: [RFC 3/4] Remove nest locking operation with mmap_sem
Date: Wed, 19 Apr 2017 14:18:26 +0200 [thread overview]
Message-ID: <44339a935e5baa965acb91aa883a5af6e7e64864.1492595898.git.ldufour@linux.vnet.ibm.com> (raw)
In-Reply-To: <cover.1492595897.git.ldufour@linux.vnet.ibm.com>
In-Reply-To: <cover.1492595897.git.ldufour@linux.vnet.ibm.com>
The range locking framework doesn't yet provide nest locking
operation, so remove them assuming that the check is now good.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
mm/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index cd8fa7e74784..4df13e633e92 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3284,7 +3284,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma)
* The LSB of head.next can't change from under us
* because we hold the mm_all_locks_mutex.
*/
- down_write_nest_lock(&anon_vma->root->rwsem, &mm->mmap_sem);
+ down_write(&anon_vma->root->rwsem);
/*
* We can safely modify head.next after taking the
* anon_vma->root->rwsem. If some other vma in this mm shares
@@ -3314,7 +3314,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
*/
if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags))
BUG();
- down_write_nest_lock(&mapping->i_mmap_rwsem, &mm->mmap_sem);
+ down_write(&mapping->i_mmap_rwsem);
}
}
--
2.7.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-04-19 12:18 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 ` Laurent Dufour [this message]
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
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=44339a935e5baa965acb91aa883a5af6e7e64864.1492595898.git.ldufour@linux.vnet.ibm.com \
--to=ldufour@linux.vnet.ibm.com \
--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=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