lkml.org 
[lkml]   [2019]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] locking/lockdep: Reuse free chain_hlocks entries
On Fri, Dec 13, 2019 at 01:35:05PM -0500, Waiman Long wrote:
> On 12/13/19 1:12 PM, Peter Zijlstra wrote:
> >> In this way, the wasted space will be k bytes where k is the number of
> >> 1-entry chains. I don't think merging adjacent blocks will be that
> >> useful at this point. We can always add this capability later on if it
> >> is found to be useful.
> > I'm thinking 1 entry isn't much of a chain. My brain is completely fried
> > atm, but are we really storing single entry 'chains' ? It seems to me we
> > could skip that.
> >
> Indeed, the current code can produce a 1-entry chain. I also thought
> that a chain had to be at least 2 entries. I got tripped up assuming
> that. It could be a bug somewhere that allow a 1-entry chain to happen,
> but I am not focusing on that right now.

If we need the minimum 2 entry granularity, it might make sense to spend
a little time on that. If we can get away with single entry markers,
then maybe write a comment so we'll not forget about it.

\
 
 \ /
  Last update: 2019-12-13 19:48    [W:0.067 / U:41.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site