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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190701072645.GK3402@hirez.programming.kicks-ass.net>
Date:   Mon, 1 Jul 2019 09:26:45 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Michel Lespinasse <walken@...gle.com>
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        David Howells <dhowells@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rbtree: avoid generating code twice for the cached
 versions

On Thu, Jun 27, 2019 at 09:50:08PM -0700, Michel Lespinasse wrote:
> As was already noted in rbtree.h, the logic to cache rb_first (or rb_last)
> can easily be implemented externally to the core rbtree api.
> 
> Change the implementation to do just that. Previously the update of
> rb_leftmost was wired deeper into the implemntation, but there were
> some disadvantages to that - mostly, lib/rbtree.c had separate
> instantiations for rb_insert_color() vs rb_insert_color_cached(), as well
> as rb_erase() vs rb_erase_cached(), which were doing exactly the same
> thing save for the rb_leftmost update at the start of either function.
> 

> Signed-off-by: Michel Lespinasse <walken@...gle.com>
> ---
>  include/linux/rbtree.h           | 70 +++++++++++++++++++++-----------
>  include/linux/rbtree_augmented.h | 27 +++++-------
>  lib/rbtree.c                     | 40 ++----------------
>  3 files changed, 59 insertions(+), 78 deletions(-)

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ