lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 Jan 2018 16:44:28 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Vitaly Wool <vitalywool@...il.com>
Cc:     Arve Hjønnevåg <arve@...roid.com>,
        Todd Kjos <tkjos@...roid.com>,
        Martijn Coenen <maco@...roid.com>,
        Oleksiy.Avramchenko@...y.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] binder: use lockless list for deferred_work

On Mon, Jan 08, 2018 at 02:55:18PM +0100, Vitaly Wool wrote:
> Binder uses hlist for deferred list, which isn't a good match.
> It's slow and requires mutual exclusion mechanism to protect its
> operations. Moreover, having schedule_work() called under a mutex
> may cause significant delays and creates noticeable adverse effect
> on Binder performance.
> 
> Deferred list in Binder is actually treated in a very simple way:
> either add an entry to it or delete the first entry from it. llist
> (lockless list) is a good match for such usage pattern, and it is
> of course quite a bit faster and doesn't require locking.
> 
> To be able to add an entry to an llist only if it's not already on
> another llist, this patch adds two small helper functions. That is,
> llist_add_exclusive would only add a node if it's not already on a
> list, and llist_del_first_exclusive will delete the first node off
> the list and mark it as not being on any list.
> 
> Signed-off-by: Vitaly Vul <vitaly.vul@...y.com>
> ---
>  drivers/android/binder.c | 87 ++++++++++++++++++++++++++++++++++++------------
>  1 file changed, 66 insertions(+), 21 deletions(-)

Martijn and Todd, any objections to this patch?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ