Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755758AbbEUNJv (ORCPT ); Thu, 21 May 2015 09:09:51 -0400 Received: from smtprelay0124.hostedemail.com ([216.40.44.124]:39041 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753041AbbEUNJu (ORCPT ); Thu, 21 May 2015 09:09:50 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2736:2740:2859:2919:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3653:3742:3865:3866:3867:3868:3870:3871:3872:3873:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6119:6261:7875:7903:8603:8660:8957:9007:9025:9388:10004:10400:10482:10848:10967:11026:11232:11473:11658:11914:12043:12114:12517:12519:12555:12740:13069:13148:13230:13311:13357:14093:14097:19901:19997:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: board33_7241e37c75b55 X-Filterd-Recvd-Size: 2563 Date: Thu, 21 May 2015 09:09:43 -0400 From: Steven Rostedt To: "Paul E. McKenney" 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: <20150521090943.0e01ed05@gandalf.local.home> In-Reply-To: <20150521125224.GK6776@linux.vnet.ibm.com> References: <1432202647-20201-1-git-send-email-dvlasenk@redhat.com> <20150521125224.GK6776@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 41 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 ;-) -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/