Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681651
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread |
| Date | 2017-07-05 18:40 +0200 |
| Message-ID | <tZVvl-dV-37@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <tXYdY-2mX-25@gated-at.bofh.it> <tY404-5YH-51@gated-at.bofh.it> <tY4jn-64M-7@gated-at.bofh.it> <tZ7yy-BB-7@gated-at.bofh.it> <tZV2i-8vO-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On (07/02/17 22:27), Pavel Machek wrote:
[..]
> > +#define PRINTK_FLOOD_DEFAULT_DELAY 10
> > +
> > int printk_delay_msec __read_mostly;
>
> = 10;
the idea is to throttle printk() only (and as long as) when we see
that something is not right. like when we added 4 (a random number)
times more messages that we were able to print so far. printk_delay_msec
would throttle all printk calls. there is a difference.
there are some cases that are sort of broken with this automatic
throttling. the simples one is printk() under console_lock().
the harder one is throttling printk() from IRQ context. that
can be risky, in theory. may be I'm overcomplicating here; if
the system has hard locked up due to printk throttling from IRQ,
then probably it was going to lockup anyway.
need to check sysrq-t case, tho.
> > + if (console_seen < 4 * console_to_see) {
> > + if (printk_delay_msec)
> > + __printk_delay(printk_delay_msec);
> > + else
> > + __printk_delay(PRINTK_FLOOD_DEFAULT_DELAY);
>
> And get rid of if () here? We want to enable delays of 0...
this if () is totally useless and stupid, yes. realized after I sent
the mail.
-ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread Pavel Machek <pavel@ucw.cz> - 2017-07-05 18:10 +0200 Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-07-05 18:40 +0200
csiph-web