From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <kernel@kyup.com>
Cc: jbacik@fb.com, clm@fb.com, operations@siteground.com,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Add ratelimiting to printing facility
Date: Tue, 12 Jul 2016 15:20:44 +0200 [thread overview]
Message-ID: <20160712132044.GC10595@suse.cz> (raw)
In-Reply-To: <1468326012-15910-1-git-send-email-kernel@kyup.com>
On Tue, Jul 12, 2016 at 03:20:12PM +0300, Nikolay Borisov wrote:
> Currently the btrfs printk infrastructure doesn't implement any
> kind of ratelimiting.
If you count the whole infrastructure, it does. See ctree.h and macros
ending with _rl (btrfs_err_rl), and should be used where the messages
are likely to flood. Otherwise I think "more is better" regarding
messages as this is helpful when debugging issues.
> Recently I came accross a case where due to
> FS corruption an excessive amount of printk caused the softlockup
> detector to trigger and reset the server. This patch aims to avoid
> two types of issue:
> * I want to avoid different levels of messages interefere with the
> ratelimiting of oneanother so as to avoid a situation where a
> flood of INFO messages causes the ratelimit to trigger,
> potentially leading to supression of more important messages.
Yeah, that's my concern as well. What if there's a burst of several
error messages that do not fit to the limit and some of them get
dropped.
> * Avoid a flood of any type of messages rendering the machine
> unusable
While I'd rather set a per-message ratelimiting, it's possible that an
unexpected error will start flooding. So some sort of per-level limiting
could be implemented, as you propose, but I'd suggest to set the numbers
higher. That way it would still flood up to certain level but should
avoid the lockups.
next prev parent reply other threads:[~2016-07-12 13:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 12:20 [PATCH] btrfs: Add ratelimiting to printing facility Nikolay Borisov
2016-07-12 13:20 ` David Sterba [this message]
2016-07-12 13:47 ` Nikolay Borisov
2016-07-12 16:01 ` David Sterba
2016-07-13 7:05 ` [PATCH] btrfs: Ratelimit message printing Nikolay Borisov
2016-07-13 12:15 ` David Sterba
2016-07-13 13:19 ` [PATCH 1/2] btrfs: Ratelimit an info message Nikolay Borisov
2016-07-13 13:19 ` [PATCH 2/2] btrfs: Add ratelimit to btrfs printing Nikolay Borisov
2016-07-13 13:44 ` David Sterba
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=20160712132044.GC10595@suse.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=jbacik@fb.com \
--cc=kernel@kyup.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=operations@siteground.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).