Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630238

Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature
Date 2017-04-25 09:10 +0200
Message-ID <tA2LM-1un-27@gated-at.bofh.it> (permalink)
References <tkQ09-5P9-3@gated-at.bofh.it> <tkQ09-5P9-17@gated-at.bofh.it> <ty1At-6ev-5@gated-at.bofh.it> <tzCxX-185-1@gated-at.bofh.it> <tzIDn-5fx-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 24, 2017 at 11:30:51AM +0200, Peter Zijlstra wrote:
> +static void add_xhlock(struct held_lock *hlock)
> +{
> +       unsigned int idx = current->xhlock_idx++;
> +       struct hist_lock *xhlock = &xhlock(idx);
> 
> Yes, I misread that. Then '0' has the oldest entry, which is slightly
> weird. Should we change that?

I will just follow your decision. Do you think I should change it so
that 'xhlock_idx' points to newest one, or ok to keep it unchanged?

> 
> 
> > > > +
> > > > +		if (!xhlock_used(xhlock))
> > > > +			break;
> > > > +
> > > > +		if (before(xhlock->hlock.gen_id, xlock->hlock.gen_id))
> > > > +			break;
> > > > +
> > > > +		if (same_context_xhlock(xhlock) &&
> > > > +		    !commit_xhlock(xlock, xhlock))
> > > 
> > > return with graph_lock held?
> > 
> > No. When commit_xhlock() returns 0, the lock was already unlocked.
> 
> Please add a comment, because I completely missed that. That's at least
> 2 functions deeper.

Yes, I will add a comment.

Thank you.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-04-19 19:30 +0200
  Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-04-24 05:10 +0200
    Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-04-24 11:40 +0200
      Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-04-25 09:10 +0200

csiph-web