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


Groups > linux.kernel > #1717979

Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING
Date 2017-08-23 04:20 +0200
Message-ID <uhtqV-2RF-1@gated-at.bofh.it> (permalink)
References (1 earlier) <ugX7H-6aN-9@gated-at.bofh.it> <uhaeB-6o2-7@gated-at.bofh.it> <uhdma-en-19@gated-at.bofh.it> <uhdFw-ng-19@gated-at.bofh.it> <uhdPb-qO-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 22, 2017 at 11:37:03AM +0200, Peter Zijlstra wrote:
> On Tue, Aug 22, 2017 at 06:22:36PM +0900, Byungchul Park wrote:
> > On Tue, Aug 22, 2017 at 11:06:03AM +0200, Peter Zijlstra wrote:
> > > So I did the below little hack, which basically wipes the entire lock
> > > history when we start a work and thereby disregards/looses the
> > > dependency on the work 'lock'.
> > > 
> > > It makes my test box able to boot and build a kernel on XFS, so while I
> > > see what you're saying (I think), it doesn't appear to instantly show.
> > > 
> > > Should I run xfstests or something to further verify things are OK? Does
> > > that need a scratch partition (I keep forgetting how to run that stuff
> > > :/).
> > > 
> > > ---
> > > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > > index 66011c9f5df3..de91cdce9460 100644
> > > --- a/kernel/locking/lockdep.c
> > > +++ b/kernel/locking/lockdep.c
> > > @@ -4756,10 +4756,14 @@ void crossrelease_hist_start(enum xhlock_context_t c)
> > >  {
> > >  	struct task_struct *cur = current;
> > >  
> > > -	if (cur->xhlocks) {
> > > -		cur->xhlock_idx_hist[c] = cur->xhlock_idx;
> > > -		cur->hist_id_save[c] = cur->hist_id;
> > > -	}
> > > +	if (!cur->xhlocks)
> > > +		return;
> > > +
> > > +	if (c == XHLOCK_PROC)
> > > +		invalidate_xhlock(&xhlock(cur->xhlock_idx));
> > 
> > We have to detect dependecies if it exists, even in the following case:
> > 
> > oooooooiiiiiiiiiiiiiiiiiii.........
> >   |<- range for commit ->|
> > 
> >   where
> >   o: acquisition outside of each work,
> >   i: acquisition inside of each work,
> > 
> > With yours, we can never detect dependecies wrt 'o'.
> 
> There really shouldn't be any o's when you call

There can be any o's.

> crossrelease_hist_start(XHLOCK_PROC), it should denote the bottom of a

No, I don't think so. It can be either the bottom or not.

hist_start() and hist_end() is only for special contexts which need roll
back on exit e.g. irq, work and so on. Normal kernel context should work
well w/o hist_start() or hist_end().

> context, see:
> 
>   https://lkml.kernel.org/r/20170301104328.GD6515@twins.programming.kicks-ass.net

Actually, I don't agree with that.

> And in that respect you placed the calls wrongly in process_one_work(),

Why is it wrong? It's intended. Could you tell me why?

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


Thread

[PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-17 11:00 +0200
  [PATCH v3 2/3] lockdep: Reword title of LOCKDEP_CROSSRELEASE config Byungchul Park <byungchul.park@lge.com> - 2017-08-17 11:00 +0200
    [tip:locking/core] locking/lockdep: Reword title of  LOCKDEP_CROSSRELEASE config tip-bot for Byungchul Park <tipbot@zytor.com> - 2017-08-17 12:30 +0200
  [PATCH v3 3/3] lockdep: Rename LOCKDEP_COMPLETE config Byungchul Park <byungchul.park@lge.com> - 2017-08-17 11:00 +0200
    [tip:locking/core] locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE  to CONFIG_LOCKDEP_COMPLETIONS tip-bot for Byungchul Park <tipbot@zytor.com> - 2017-08-17 12:30 +0200
  [tip:locking/core] locking/lockdep: Make  CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING tip-bot for Byungchul Park <tipbot@zytor.com> - 2017-08-17 12:30 +0200
    Re: [tip:locking/core] locking/lockdep: Make  CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING Ingo Molnar <mingo@kernel.org> - 2017-08-17 12:50 +0200
      Re: [tip:locking/core] locking/lockdep: Make  CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-18 07:40 +0200
  Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-21 17:50 +0200
    Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-22 07:20 +0200
      Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 10:00 +0200
        Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-22 11:00 +0200
          Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 11:30 +0200
            Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-22 11:40 +0200
              Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 12:10 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 16:00 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 16:50 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 17:20 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Oleg Nesterov <oleg@redhat.com> - 2017-08-22 18:00 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 18:40 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Oleg Nesterov <oleg@redhat.com> - 2017-08-23 18:40 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-23 19:50 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 08:20 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 09:40 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 10:20 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-25 03:20 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 04:50 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 08:40 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-23 12:30 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 07:10 +0200
    Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Dave Chinner <david@fromorbit.com> - 2017-08-22 07:50 +0200
      Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 11:10 +0200
        Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-22 11:30 +0200
          Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 11:40 +0200
            Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-22 11:50 +0200
            Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 04:20 +0200
              Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 08:10 +0200
              Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-23 12:30 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 04:10 +0200
                Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 09:40 +0200
        Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Dave Chinner <david@fromorbit.com> - 2017-08-22 23:20 +0200
        Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 04:40 +0200
          Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 08:20 +0200
          Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Peter Zijlstra <peterz@infradead.org> - 2017-08-23 12:50 +0200
            Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-24 07:10 +0200
      Re: [PATCH v3 1/3] lockdep: Make LOCKDEP_CROSSRELEASE configs all  part of PROVE_LOCKING Byungchul Park <byungchul.park@lge.com> - 2017-08-23 04:00 +0200

csiph-web