Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437AbdH3Ixa (ORCPT ); Wed, 30 Aug 2017 04:53:30 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:54268 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbdH3Ix2 (ORCPT ); Wed, 30 Aug 2017 04:53:28 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.220.161 X-Original-MAILFROM: byungchul.park@lge.com From: "Byungchul Park" To: "'Peter Zijlstra'" , "'Sergey Senozhatsky'" Cc: "'Bart Van Assche'" , , , , , , , , References: <20170822183816.7925e0f8@canb.auug.org.au> <20170822104708.GA491@jagdpanzerIV.localdomain> <1503438234.2508.27.camel@wdc.com> <20170823000304.GK20323@X58A-UD3R> <20170830052037.GA432@jagdpanzerIV.localdomain> <20170830054334.GF3240@X58A-UD3R> <20170830061511.GA330@jagdpanzerIV.localdomain> <20170830084207.GL32112@worktop.programming.kicks-ass.net> <20170830084746.GC660@worktop.programming.kicks-ass.net> In-Reply-To: <20170830084746.GC660@worktop.programming.kicks-ass.net> Subject: RE: possible circular locking dependency detected [was: linux-next: Tree for Aug 22] Date: Wed, 30 Aug 2017 17:53:23 +0900 Message-ID: <004501d3216d$703bde80$50b39b80$@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJFAhARxHftDOHXinJ/8pi5r05+PAIz2GQZAeL+ovcChfYhxAFIRm4JASb2HzcBYGx7KwMMmmYhARqFFxihRDm8sA== Content-Language: ko Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 40 > -----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)