linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Byungchul Park" <byungchul.park@lge.com>
To: 'Peter Zijlstra' <peterz@infradead.org>,
	'Sergey Senozhatsky' <sergey.senozhatsky.work@gmail.com>
Cc: 'Bart Van Assche' <Bart.VanAssche@wdc.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	martin.petersen@oracle.com, axboe@kernel.dk,
	linux-scsi@vger.kernel.org, sfr@canb.auug.org.au,
	linux-next@vger.kernel.org, kernel-team@lge.com
Subject: RE: possible circular locking dependency detected [was: linux-next: Tree for Aug 22]
Date: Wed, 30 Aug 2017 17:53:23 +0900	[thread overview]
Message-ID: <004501d3216d$703bde80$50b39b80$@lge.com> (raw)
In-Reply-To: <20170830084746.GC660@worktop.programming.kicks-ass.net>

> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@infradead.org]
> Sent: Wednesday, August 30, 2017 5:48 PM
> To: Sergey Senozhatsky
> Cc: Byungchul Park; Bart Van Assche; linux-kernel@vger.kernel.org; linux-
> block@vger.kernel.org; martin.petersen@oracle.com; axboe@kernel.dk; linux-
> scsi@vger.kernel.org; sfr@canb.auug.org.au; linux-next@vger.kernel.org;
> kernel-team@lge.com
> Subject: Re: possible circular locking dependency detected [was: linux-
> next: Tree for Aug 22]
> 
> On Wed, Aug 30, 2017 at 10:42:07AM +0200, Peter Zijlstra wrote:
> >
> > So the overhead looks to be spread out over all sorts, which makes it
> > harder to find and fix.
> >
> > stack unwinding is done lots and is fairly expensive, I've not yet
> > checked if crossrelease does too much of that.
> 
> Aah, we do an unconditional stack unwind for every __lock_acquire() now.
> It keeps a trace in the xhlocks[].

Yeah.. I also think this is most significant..

> 
> Does the below cure most of that overhead?
> 
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 44c8d0d17170..7b872036b72e 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -4872,7 +4872,7 @@ static void add_xhlock(struct held_lock *hlock)
>  	xhlock->trace.max_entries = MAX_XHLOCK_TRACE_ENTRIES;
>  	xhlock->trace.entries = xhlock->trace_entries;
>  	xhlock->trace.skip = 3;
> -	save_stack_trace(&xhlock->trace);
> +	/* save_stack_trace(&xhlock->trace); */
>  }
> 
>  static inline int same_context_xhlock(struct hist_lock *xhlock)

  reply	other threads:[~2017-08-30  8:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22  8:38 linux-next: Tree for Aug 22 Stephen Rothwell
2017-08-22 10:47 ` possible circular locking dependency detected [was: linux-next: Tree for Aug 22] Sergey Senozhatsky
2017-08-22 21:43   ` Bart Van Assche
2017-08-23  0:03     ` Byungchul Park
2017-08-23  2:36       ` Sergey Senozhatsky
2017-08-23  2:59         ` Byungchul Park
2017-08-23  3:49       ` Boqun Feng
2017-08-23  4:38         ` Boqun Feng
2017-08-23  4:46           ` Sergey Senozhatsky
2017-08-23  5:35             ` Boqun Feng
2017-08-23  5:44               ` Sergey Senozhatsky
2017-08-23  5:55               ` Sergey Senozhatsky
2017-08-24  4:39                 ` Boqun Feng
2017-08-24  4:49                   ` Sergey Senozhatsky
2017-08-23  5:44           ` Byungchul Park
2017-08-23  4:46         ` Byungchul Park
2017-08-23  5:01           ` Boqun Feng
2017-08-23  7:53       ` Peter Zijlstra
2017-08-30  5:20       ` Sergey Senozhatsky
2017-08-30  5:43         ` Byungchul Park
2017-08-30  6:15           ` Sergey Senozhatsky
2017-08-30  8:42             ` Peter Zijlstra
2017-08-30  8:47               ` Peter Zijlstra
2017-08-30  8:53                 ` Byungchul Park [this message]
2017-08-30 12:30                 ` Sergey Senozhatsky
2017-08-22 18:11 ` linux-next: Tree for Aug 22 Stephen Rothwell
2017-08-22 18:14   ` Stephen Rothwell
2017-08-22 18:59     ` Paul E. McKenney
2017-08-22 19:12       ` Stephen Rothwell
2017-08-22 19:32         ` Paul E. McKenney
2017-08-22 19:36           ` Paul E. McKenney
2017-08-22 21:57             ` Stephen Rothwell
2017-08-22 22:27               ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004501d3216d$703bde80$50b39b80$@lge.com' \
    --to=byungchul.park@lge.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=kernel-team@lge.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peterz@infradead.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).