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


Groups > linux.kernel > #1437781

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

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH -v3.1 1/2] ratelimit: Extend to print suppressed messages on release
Date 2016-07-06 17:00 +0200
Message-ID <rRWsV-22V-13@gated-at.bofh.it> (permalink)
References <rRd2N-6Kd-3@gated-at.bofh.it> <rRd2N-6Kd-11@gated-at.bofh.it> <rRV3Q-1jb-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2016-07-06 at 15:28 +0200, Borislav Petkov wrote:
> Extend the ratelimiting facility to print the amount of suppressed lines
> when it is being released.
[]
> diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
[]
> +static inline void ratelimit_state_exit(struct ratelimit_state *rs)
> +{
> +	if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE))
> +		return;
> +
> +	if (rs->missed)
> +		printk(KERN_WARNING "%s: %d output lines suppressed due to ratelimiting\n",
> +		       current->comm, rs->missed);

Please use pr_warn as it will use whatever
pr_fmt prefix is specified by the subsystem.

Maybe:
	if (rs->missed)
		pr_warn("ratelimit: %s: %d output lines suppressed\n",
			current->comm, rs->missed);

to be more similar to the callback suppressed message in
lib/ratelimit.c

				pr_warn("%s: %d callbacks suppressed\n", func, rs->missed);

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


Thread

[PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on release Borislav Petkov <bp@alien8.de> - 2016-07-04 16:30 +0200
  Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Steven Rostedt <rostedt@goodmis.org> - 2016-07-05 20:30 +0200
    Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-05 20:50 +0200
      Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Steven Rostedt <rostedt@goodmis.org> - 2016-07-05 21:00 +0200
        Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-05 21:50 +0200
          Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Steven Rostedt <rostedt@goodmis.org> - 2016-07-05 22:00 +0200
            Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Joe Perches <joe@perches.com> - 2016-07-05 22:10 +0200
              Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on  release Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-05 23:00 +0200
                Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on  release Paolo Bonzini <pbonzini@redhat.com> - 2016-07-05 23:20 +0200
                Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages on  release Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-05 23:30 +0200
                Re: [PATCH -v3 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-05 23:40 +0200
  [PATCH -v3.1 1/2] ratelimit: Extend to print suppressed messages on  release Borislav Petkov <bp@alien8.de> - 2016-07-06 15:30 +0200
    Re: [PATCH -v3.1 1/2] ratelimit: Extend to print suppressed  messages on release Steven Rostedt <rostedt@goodmis.org> - 2016-07-06 15:50 +0200
      [PATCH -v3.2 1/2] ratelimit: Extend to print suppressed messages on  release Borislav Petkov <bp@alien8.de> - 2016-07-06 17:00 +0200
        Re: [PATCH -v3.2 1/2] ratelimit: Extend to print suppressed  messages on release Steven Rostedt <rostedt@goodmis.org> - 2016-07-07 03:20 +0200
          Re: [PATCH -v3.2 1/2] ratelimit: Extend to print suppressed messages  on release Borislav Petkov <bp@alien8.de> - 2016-07-07 07:40 +0200
    Re: [PATCH -v3.1 1/2] ratelimit: Extend to print suppressed  messages on release Joe Perches <joe@perches.com> - 2016-07-06 17:00 +0200

csiph-web