Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433653

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

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages on release
Date 2016-06-29 12:30 +0200
Message-ID <rPkUN-2ZK-35@gated-at.bofh.it> (permalink)
References <rPkrL-2AI-9@gated-at.bofh.it> <rPkrL-2AI-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2016-06-29 at 11:56 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Extend the ratelimiting facility to print the amount of suppressed lines
> when it is being released.
> 
> Separated from a previous patch by Linus.
[]
> diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
[]
> @@ -15,6 +19,7 @@ struct ratelimit_state {
>  	int		printed;
>  	int		missed;
>  	unsigned long	begin;
> +	unsigned long	flags;
>  };

There are a lot of ratelimit_state structs used in the kernel.
Every printk like <foo>_ratelimited uses a static one.

It'd likely be better to reduce the struct ratelimit_state
size rather than expand it.

burst and printed could probably become s16 or even s8.
flags could be u8 until necessary to expand.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -v2 0/2] printk.kmsg: Ratelimit it by default Borislav Petkov <bp@alien8.de> - 2016-06-29 12:00 +0200
  [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages on release Borislav Petkov <bp@alien8.de> - 2016-06-29 12:00 +0200
    Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Joe Perches <joe@perches.com> - 2016-06-29 12:30 +0200
      Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-06-29 16:30 +0200
    Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Ingo Molnar <mingo@kernel.org> - 2016-07-01 10:30 +0200
      Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-01 11:20 +0200
        Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Ingo Molnar <mingo@kernel.org> - 2016-07-01 12:40 +0200
        Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-01 12:40 +0200
        Re: [PATCH -v2 1/2] ratelimit: Extend to print suppressed messages  on release Ingo Molnar <mingo@kernel.org> - 2016-07-01 13:30 +0200
  [PATCH -v2 2/2] printk: Add kernel parameter to control writes to /dev/kmsg Borislav Petkov <bp@alien8.de> - 2016-06-29 12:00 +0200
    Re: [PATCH -v2 2/2] printk: Add kernel parameter to control writes  to /dev/kmsg Borislav Petkov <bp@alien8.de> - 2016-07-01 11:20 +0200
      Re: [PATCH -v2 2/2] printk: Add kernel parameter to control writes  to /dev/kmsg Ingo Molnar <mingo@kernel.org> - 2016-07-01 12:40 +0200
    Re: [PATCH -v2 2/2] printk: Add kernel parameter to control writes  to /dev/kmsg Ingo Molnar <mingo@kernel.org> - 2016-07-01 11:20 +0200

csiph-web