From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754488AbcGEUJA (ORCPT ); Tue, 5 Jul 2016 16:09:00 -0400 Received: from smtprelay0046.hostedemail.com ([216.40.44.46]:36021 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752100AbcGEUI7 (ORCPT ); Tue, 5 Jul 2016 16:08:59 -0400 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:1981:2194:2199:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3167:3353:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:5007:7903:7904:10004:10400:10848:10967:11026:11232:11658:11783:11914:12043:12048:12296:12438:12517:12519:12740:13019:13069:13311:13357:13439:13894:14181:14659:14721:21080:21212:30012:30054: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:3,LUA_SUMMARY:none X-HE-Tag: owner00_309b46b27575e X-Filterd-Recvd-Size: 2849 Message-ID: <1467749333.16342.5.camel@perches.com> Subject: Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release From: Joe Perches To: Steven Rostedt , Borislav Petkov , Paolo Bonzini , Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= , Christian Borntraeger , Cornelia Huck Cc: LKML , Andrew Morton , Franck Bui , Greg Kroah-Hartman , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Date: Tue, 05 Jul 2016 13:08:53 -0700 In-Reply-To: <20160705154959.2705b658@gandalf.local.home> References: <1467642292-15671-1-git-send-email-bp@alien8.de> <1467642292-15671-2-git-send-email-bp@alien8.de> <20160705142648.57456ef8@gandalf.local.home> <20160705184517.GF12027@pd.tnic> <20160705145732.4b6dbd55@gandalf.local.home> <20160705194244.GG12027@pd.tnic> <20160705154959.2705b658@gandalf.local.home> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 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 On Tue, 2016-07-05 at 15:49 -0400, Steven Rostedt wrote: > On Tue, 5 Jul 2016 21:42:45 +0200 Borislav Petkov wrote: > > On Tue, Jul 05, 2016 at 02:57:32PM -0400, Steven Rostedt wrote: > > > Perhaps we should show both, unless you don't think this will ever be > > > used by anything other than devkmsg?   > > I'd say let's do it only when we go down that road and start using it > > for something else. > > > > Because, for example, the ratelimiting thing is, in fact, generic but it > > is used primarily to ratelimit printks. Even though it could be used for > > something else, theoretically... > > > But you know... Build it and they will come. arch/s390/kvm/kvm-s390.c:       ratelimit_state_init(&kvm->arch.sthyi_limit, 5 * HZ, 500); As far as I know, _ratelimit is used for non-printk purposes in arch/s390/kvm/sthyi.c int handle_sthyi(struct kvm_vcpu *vcpu) { int reg1, reg2, r = 0; u64 code, addr, cc = 0; struct sthyi_sctns *sctns = NULL; /* * STHYI requires extensive locking in the higher hypervisors * and is very computational/memory expensive. Therefore we * ratelimit the executions per VM. */ if (!__ratelimit(&vcpu->kvm->arch.sthyi_limit)) { kvm_s390_retry_instr(vcpu); return 0; }