From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964838AbbEUN0o (ORCPT ); Thu, 21 May 2015 09:26:44 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:50901 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755329AbbEUNZf (ORCPT ); Thu, 21 May 2015 09:25:35 -0400 Date: Thu, 21 May 2015 06:25:28 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Denys Vlasenko , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, Tejun Heo , Oleg Nesterov Subject: Re: [PATCH] rcu: Deinline rcu_read_lock_sched_held() if DEBUG_LOCK_ALLOC Message-ID: <20150521132528.GM6776@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1432202647-20201-1-git-send-email-dvlasenk@redhat.com> <20150521125224.GK6776@linux.vnet.ibm.com> <20150521090943.0e01ed05@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150521090943.0e01ed05@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15052113-0017-0000-0000-00000B02159E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2015 at 09:09:43AM -0400, Steven Rostedt wrote: > On Thu, 21 May 2015 05:52:24 -0700 > "Paul E. McKenney" wrote: > > > On Thu, May 21, 2015 at 12:04:07PM +0200, Denys Vlasenko wrote: > > > DEBUG_LOCK_ALLOC=y is not a production setting, but it is > > > not very unusual either. Many developers routinely > > > use kernels built with it enabled. > > > > > > Apart from being selected by hand, it is also auto-selected by > > > PROVE_LOCKING "Lock debugging: prove locking correctness" and > > > LOCK_STAT "Lock usage statistics" config options. > > > LOCK STAT is necessary for "perf lock" to work. > > > > > > I wouldn't spend too much time optimizing it, but this particular > > > function has a very large cost in code size: when it is deinlined, > > > code size decreases by 830,000 bytes: > > > > > > text data bss dec hex filename > > > 85674192 22294776 20627456 128596424 7aa39c8 vmlinux.before > > > 84837612 22294424 20627456 127759492 79d7484 vmlinux > > > > > > (with this config: http://busybox.net/~vda/kernel_config) > > > > OK, I'll bite... I do see the numbers above, but is this really a > > problem for anyone? As you say, DEBUG_LOCK_ALLOC=y is not a production > > setting. > > > > Correct, and because it's not a production setting it should be fine as > a call and not a static inline. The i$ hit probably neglects the saving > of it being inlined too. > > It's not a big deal either way, but it may make building the kernel a > bit faster ;-) OK, if you believe that it is valuable enough to give it a Reviewed-by, I will queue it. ;-) Thanx, Paul