Re: [PATCH] binder: reduce mmap_sem write-side lock
From: Greg KH
Date: Mon Feb 18 2019 - 03:32:13 EST
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@xxxxxxxxxx>
> Cc: Martijn Coenen <maco@xxxxxxxxxxx>
> Cc: Arve Hjønnevåg <arve@xxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
> ---
> 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