All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jamie Bainbridge
	<jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] cifs: Ratelimit kernel log messages
Date: Sun, 29 Nov 2015 22:07:01 -0600	[thread overview]
Message-ID: <CAH2r5muynQt7iCq=mVpjWq1EWq-z_pdKjiZntEWEXaxLsR6JjQ@mail.gmail.com> (raw)
In-Reply-To: <7094bd3a2ef3c030463aa04fbce8369bfb33be9c.1446897962.git.jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

repushed to cifs-2.6.git (after finding out that the kbuild test robot
warning messages for ARCH=mn10300 is likely not a real problem.

On Sat, Nov 7, 2015 at 6:13 AM, Jamie Bainbridge
<jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Under some conditions, CIFS can repeatedly call the cifs_dbg() logging
> wrapper. If done rapidly enough, the console framebuffer can softlockup
> or "rcu_sched self-detected stall". Apply the built-in log ratelimiters
> to prevent such hangs.
>
> Signed-off-by: Jamie Bainbridge <jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  fs/cifs/cifs_debug.c | 2 +-
>  fs/cifs/cifs_debug.h | 9 ++++-----
>  2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
> index 7febcf2475c5ab675c04dfd2fddaa3ed574522a0..50b268483302922ee63d205a2fa560ec27676eed 100644
> --- a/fs/cifs/cifs_debug.c
> +++ b/fs/cifs/cifs_debug.c
> @@ -50,7 +50,7 @@ void cifs_vfs_err(const char *fmt, ...)
>         vaf.fmt = fmt;
>         vaf.va = &args;
>
> -       pr_err("CIFS VFS: %pV", &vaf);
> +       pr_err_ratelimited("CIFS VFS: %pV", &vaf);
>
>         va_end(args);
>  }
> diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
> index f40fbaca1b2a2c1d7457d71bd1a5e7dd4b477859..66cf0f9fff8984cb12eed1c89d91bc9c6ccc6a9d 100644
> --- a/fs/cifs/cifs_debug.h
> +++ b/fs/cifs/cifs_debug.h
> @@ -51,14 +51,13 @@ __printf(1, 2) void cifs_vfs_err(const char *fmt, ...);
>  /* information message: e.g., configuration, major event */
>  #define cifs_dbg(type, fmt, ...)                                       \
>  do {                                                                   \
> -       if (type == FYI) {                                              \
> -               if (cifsFYI & CIFS_INFO) {                              \
> -                       pr_debug("%s: " fmt, __FILE__, ##__VA_ARGS__);  \
> -               }                                                       \
> +       if (type == FYI && cifsFYI & CIFS_INFO) {                       \
> +               pr_debug_ratelimited("%s: "                             \
> +                           fmt, __FILE__, ##__VA_ARGS__);              \
>         } else if (type == VFS) {                                       \
>                 cifs_vfs_err(fmt, ##__VA_ARGS__);                       \
>         } else if (type == NOISY && type != 0) {                        \
> -               pr_debug(fmt, ##__VA_ARGS__);                           \
> +               pr_debug_ratelimited(fmt, ##__VA_ARGS__);               \
>         }                                                               \
>  } while (0)
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

      parent reply	other threads:[~2015-11-30  4:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 12:13 [PATCH] cifs: Ratelimit kernel log messages Jamie Bainbridge
     [not found] ` <7094bd3a2ef3c030463aa04fbce8369bfb33be9c.1446897962.git.jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-30  4:07   ` Steve French [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5muynQt7iCq=mVpjWq1EWq-z_pdKjiZntEWEXaxLsR6JjQ@mail.gmail.com' \
    --to=smfrench-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=jamie.bainbridge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.