Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649AbcCLT3n (ORCPT ); Sat, 12 Mar 2016 14:29:43 -0500 Received: from smtprelay0103.hostedemail.com ([216.40.44.103]:40501 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750782AbcCLT3e (ORCPT ); Sat, 12 Mar 2016 14:29:34 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:421:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1605:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2828:2892:3138:3139:3140:3141:3142:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4362:5007:6261:7576:8660:10004:10400:10848:11026:11232:11658:11914:12114:12296:12438:12517:12519:12555:12740:13095:13148:13230:13255:13439:13894:14659:14721:21080:21212:30012:30054:30060:30064:30075: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: talk39_8d6965cd7480e X-Filterd-Recvd-Size: 4387 Message-ID: <1457810970.11972.28.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 11:29:30 -0800 In-Reply-To: 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> <1457808989.11972.22.camel@perches.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: 2909 Lines: 72 On Sat, 2016-03-12 at 19:17 +0000, Drokin, Oleg wrote: > On Mar 12, 2016, at 1:56 PM, Joe Perches wrote: > > 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? > Well. The bits about the callsite would certainly matter since > we need to know where the message is coming from. > Overwriting them in a racy way would make the messages unreliable. > > net_ratelimit() has similar parallelization and it doesn't > > seem to matter there. > That one seems to rate limit all prints together. > We are trying limit each individual one. > So if you have a bunch of print1 and a bunch of print2, but a few > of print3, you see the print3, but ratelimit the first two > and get something like this in the logs: > > print1 > print2 > print3 > print2 condensed: the message was repeated a gazillion times > print3 > print1 condensed: the message was repeated two gazillion times. Sure. ?It's up to you to control your output and I don't know if it matters or not. ?You do. > > > 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 > How are we going to rate-limit this stuff without remembering some > information between the calls? Doesn't msg_cdls just point to the other structure? Combining the 2 into one might be useful. > > o __FILE__, __func__ and __LINE__ fields have marginal value > Probably not as important in the kernel indeed, but on the > other hand if the message has moved compared to the source developer has > then there is evidence some patches were applied and that could be asked > about. > > o .msg_subsys seems set only to DEBUG_SUBSYSTEM. > This is redefined in every source file: Thanks. ?I didn't look hard.