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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Sep 2016 10:33:46 -0500
From:   Nilay Vaish <nilayvaish@...il.com>
To:     Byungchul Park <byungchul.park@....com>
Cc:     peterz@...radead.org, mingo@...nel.org, tglx@...utronix.de,
        walken@...gle.com, boqun.feng@...il.com, kirill@...temov.name,
        Linux Kernel list <linux-kernel@...r.kernel.org>,
        linux-mm@...ck.org, iamjoonsoo.kim@....com,
        akpm@...ux-foundation.org, npiggin@...il.com
Subject: Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

On 13 September 2016 at 04:45, Byungchul Park <byungchul.park@....com> wrote:
> @@ -2215,6 +2178,75 @@ cache_hit:
>         return 1;
>  }
>
> +/*
> + * Look up a dependency chain.
> + */
> +static inline struct lock_chain *lookup_chain_cache(u64 chain_key)
> +{
> +       struct hlist_head *hash_head = chainhashentry(chain_key);
> +       struct lock_chain *chain;
> +
> +       /*
> +        * We can walk it lock-free, because entries only get added
> +        * to the hash:
> +        */
> +       hlist_for_each_entry_rcu(chain, hash_head, entry) {
> +               if (chain->chain_key == chain_key) {
> +                       debug_atomic_inc(chain_lookup_hits);
> +                       return chain;
> +               }
> +       }
> +       return NULL;
> +}

Byungchul,  do you think we should increment chain_lookup_misses
before returning NULL from the above function?

--
Nilay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ