Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-19 Thread Byungchul Park
On Mon, Sep 19, 2016 at 11:36:25AM -0500, Nilay Vaish wrote: > On 18 September 2016 at 22:05, Byungchul Park wrote: > > On Thu, Sep 15, 2016 at 10:33:46AM -0500, Nilay Vaish wrote: > >> On 13 September 2016 at 04:45, Byungchul Park > >> wrote: > >> > @@ -2215,6 +2178,75 @@ cache_hit: > >> >

Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-19 Thread Nilay Vaish
On 18 September 2016 at 22:05, Byungchul Park wrote: > On Thu, Sep 15, 2016 at 10:33:46AM -0500, Nilay Vaish wrote: >> On 13 September 2016 at 04:45, Byungchul Park wrote: >> > @@ -2215,6 +2178,75 @@ cache_hit: >> > return 1; >> > } >> > >> > +/* >> > + * Look up a dependency chain. >> >

Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-18 Thread Byungchul Park
On Thu, Sep 15, 2016 at 10:33:46AM -0500, Nilay Vaish wrote: > On 13 September 2016 at 04:45, Byungchul Park wrote: > > @@ -2215,6 +2178,75 @@ cache_hit: > > return 1; > > } > > > > +/* > > + * Look up a dependency chain. > > + */ > > +static inline struct lock_chain *lookup_chain_cache(u

Re: [PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-15 Thread Nilay Vaish
On 13 September 2016 at 04:45, Byungchul Park 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(chai

[PATCH v3 03/15] lockdep: Refactor lookup_chain_cache()

2016-09-13 Thread Byungchul Park
Currently, lookup_chain_cache() provides both 'lookup' and 'add' functionalities in a function. However, each one is useful. So this patch makes lookup_chain_cache() only do lookup functionality and makes add_chain_cahce() only do add functionality. And it's more readable than these functionalities