Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbcCLS4w (ORCPT ); Sat, 12 Mar 2016 13:56:52 -0500 Received: from smtprelay0004.hostedemail.com ([216.40.44.4]:47966 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750942AbcCLS4r (ORCPT ); Sat, 12 Mar 2016 13:56:47 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1969:2195:2199:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4470:5007:6261:7576:8660:10004:10400:10848:11026:11232:11658:11914:12114:12296:12438:12517:12519:12555:12740:13069:13148:13230:13255:13311:13357:13439:13894:14659:14721:21080:21212:30012:30054:30060:30064:30090:30091,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,LFtime:2,LUA_SUMMARY:none X-HE-Tag: rings76_90235dbede358 X-Filterd-Recvd-Size: 3024 Message-ID: <1457808989.11972.22.camel@perches.com> Subject: Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc From: Joe Perches To: "Drokin, Oleg" Cc: James Simmons , Greg Kroah-Hartman , "" , "Dilger, Andreas" , Linux Kernel Mailing List , Lustre Development List , "Nunez, James A" Date: Sat, 12 Mar 2016 10:56:29 -0800 In-Reply-To: <5A0A38B8-B387-436D-B72A-7D8247B6A00D@intel.com> References: <1457805636-23859-1-git-send-email-jsimmons@infradead.org> <1457805636-23859-2-git-send-email-jsimmons@infradead.org> <1457807005.11972.9.camel@perches.com> <5A0A38B8-B387-436D-B72A-7D8247B6A00D@intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 47 On Sat, 2016-03-12 at 18:32 +0000, Drokin, Oleg wrote: > On Mar 12, 2016, at 1:23 PM, Joe Perches wrote: > > On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: > > > From: James Nunez > > > > > > This is one of the fixes broken out of patch 10000 that was > > > missed in the merger. With this fix the CERROR called in > > > sfw_handle_server_rpc will print out correctly. > > Speaking of CERROR and logging, it it really useful > > for each CERROR use to have 2 static structs? > > > > In CERROR -> CDEBUG_LIMIT there is a: > > static struct cfs_debug_limit_state cdls; > > (12 or 16 bytes depending on 32/64 bit arch) > > > > and in CDEBUG_LIMIT -> _CDEBUG > > static struct libcfs_debug_msg_data msgdata; > > (24 or 36 bytes depending on 32/64 bit arch) > > > > That seems a largish bit of data and code to initialize > > these structs for over a thousand call sites. > > > > Wouldn't a single static suffice? > Single static would not work because the code is parallel so it'll > stomp over each other. Sure,?but?would that matter in practice? net_ratelimit() has similar parallelization and it doesn't seem to matter there. > or do you mean to have a common > structure for every callsite (but instantiated separately)? That might help a tiny bit. Some possibly unnecessary bits: o .msg_cdls o __FILE__, __func__ and __LINE__ fields have marginal value o .msg_subsys seems set only to DEBUG_SUBSYSTEM. > This used to be a local structure in the past, but that > caused considerable stack growth for some functions, that added > up along the call chain, and that was the solution we came up with > that did help.