From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755568AbcGEVcB (ORCPT ); Tue, 5 Jul 2016 17:32:01 -0400 Received: from mail.skyhub.de ([78.46.96.112]:45643 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754685AbcGEVcA (ORCPT ); Tue, 5 Jul 2016 17:32:00 -0400 Date: Tue, 5 Jul 2016 23:31:47 +0200 From: Borislav Petkov To: Christian Borntraeger Cc: Joe Perches , Steven Rostedt , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Cornelia Huck , LKML , Andrew Morton , Franck Bui , Greg Kroah-Hartman , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Janosch Frank Subject: Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release Message-ID: <20160705213147.GH12027@pd.tnic> 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> <1467749333.16342.5.camel@perches.com> <577C1E63.8060608@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <577C1E63.8060608@de.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 05, 2016 at 10:53:55PM +0200, Christian Borntraeger wrote: > Yes, this is new in next. As far as I can see, the new message would only > appear if we would call ratelimit_state_exit. Correct? We do not call this - > I assume this is ok? Right, the idea for the /dev/kmsg use case was to issue the suppressed count only when we release the ratelimit state. > We really only want to reuse the rate limit base code (to avoid writing the same > code twice) and being in lib indicated that this can indeed be used outside > printk. > Now: your patch 1 would allow me to get rid of the messages completely > by setting the flag and by not calling ratelimit_state_exit. Which is probably > what we should do in our code. Yeah, that should work for your usecase. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.