Re: [perfbook] Analogy of Figure 7.11 Locking “Saw Kerf”

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 25, 2022 at 08:57:35AM +0900, Akira Yokosawa wrote:
> On Fri, 24 Jun 2022 16:33:16 -0700, Paul E. McKenney wrote:
> > On Sat, Jun 25, 2022 at 08:12:09AM +0900, Akira Yokosawa wrote:
> >> Hi Paul,
> >>
> >> I find the analogy of Figure 7.11 hard to grasp.
> >>
> >> Whether a lock is global or per-instance, the cost of locking
> >> (saw kerf) is observed only when a CPU/thread does the locking
> >> operation.
> >>
> >> In this figure, does each board represent data elements, not a
> >> CPU/thread?  If this is the case, what does the waste of "saw kerf"
> >> mean?
> >>
> >> What am I missing?
> >>
> >> (I hope I am clear enough on what I don't get...)
> > 
> > It might well be that I am getting too excited about this one.  ;-)
> > 
> > Maybe I need to drop it.  At the very least, I need to much more clearly
> > explain it.
> > 
> > But...
> > 
> > Each board represents one lock.  The "saw kerf" is the time lost when
> > releasing that lock and someone else immediately acquiring it.
> > 
> > Does that help?
> 
> Well then, why does the left side figure have ten boards?

Ten locks.  For example, the single board might correspond to a hash
table guarded by a single global lock.  The ten boards might correspond
to a hash table with ten buckets, with per-bucket locking.

But it is sounding like this analogy might be more confusing than
enlightening.

							Thanx, Paul



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux