Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Borislav Petkov
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

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Christian Borntraeger
On 07/05/2016 11:14 PM, Paolo Bonzini wrote: > > > On 05/07/2016 22:53, 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? >> >> We really

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Paolo Bonzini
On 05/07/2016 22:53, 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? > > We really only want to reuse the rate limit base code (to avoid

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Christian Borntraeger
On 07/05/2016 10:08 PM, Joe Perches wrote: > 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 e

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Joe Perches
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 devk

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Steven Rostedt
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 a

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Borislav Petkov
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 rateli

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Steven Rostedt
On Tue, 5 Jul 2016 20:45:17 +0200 Borislav Petkov wrote: > On Tue, Jul 05, 2016 at 02:26:48PM -0400, Steven Rostedt wrote: > > > + if (rs->missed) > > > + printk(KERN_WARNING "%s: %d output lines suppressed due to > > > ratelimiting\n", > > > +current->comm, rs->missed);

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Borislav Petkov
On Tue, Jul 05, 2016 at 02:26:48PM -0400, Steven Rostedt wrote: > > + if (rs->missed) > > + printk(KERN_WARNING "%s: %d output lines suppressed due to > > ratelimiting\n", > > + current->comm, rs->missed); > > Is the comm important? Yes, we wanna dump the task name w

Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-05 Thread Steven Rostedt
On Mon, 4 Jul 2016 16:24:51 +0200 Borislav Petkov wrote: > From: Borislav Petkov > > Extend the ratelimiting facility to print the amount of suppressed lines > when it is being released. > > Separated from a previous patch by Linus. > > Also, make the ON_RELEASE image not use "callbacks" as

[PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release

2016-07-04 Thread Borislav Petkov
From: Borislav Petkov Extend the ratelimiting facility to print the amount of suppressed lines when it is being released. Separated from a previous patch by Linus. Also, make the ON_RELEASE image not use "callbacks" as it is misleading. Signed-off-by: Borislav Petkov Acked-by: Linus Torvalds