From: Greg KH <gregkh@linuxfoundation.org>
To: Minchan Kim <minchan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Todd Kjos" <tkjos@google.com>,
"Martijn Coenen" <maco@android.com>,
"Arve Hjønnevåg" <arve@android.com>
Subject: Re: [PATCH] binder: reduce mmap_sem write-side lock
Date: Mon, 18 Feb 2019 09:32:08 +0100 [thread overview]
Message-ID: <20190218083208.GA20069@kroah.com> (raw)
In-Reply-To: <20190218081145.86633-1-minchan@kernel.org>
On Mon, Feb 18, 2019 at 05:11:45PM +0900, Minchan Kim wrote:
> binder has used write-side mmap_sem semaphore to release memory
> mapped at address space of the process. However, right lock to
> release pages is down_read, not down_write because page table lock
> already protects the race for parallel freeing.
>
> Please do not use mmap_sem write-side lock which is well known
> contented lock.
>
> Cc: Todd Kjos <tkjos@google.com>
> Cc: Martijn Coenen <maco@android.com>
> Cc: Arve Hjønnevåg <arve@android.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> drivers/android/binder_alloc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Is this just needed for the recent binder changes that are in
linux-next, or for older kernels as well?
thanks,
greg k-h
next prev parent reply other threads:[~2019-02-18 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 8:11 [PATCH] binder: reduce mmap_sem write-side lock Minchan Kim
2019-02-18 8:32 ` Greg KH [this message]
2019-02-18 10:47 ` Minchan Kim
2019-02-19 16:54 ` Todd Kjos
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=20190218083208.GA20069@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arve@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=minchan@kernel.org \
--cc=tkjos@google.com \
/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).