* Re: [PATCH 1/3] printk: Introduce per-console loglevel setting
[not found] <08c1dc1a96afd6b6aecc5ff3c7c0e62c36670893.1506644730.git.calvinowens@fb.com>
@ 2018-10-19 0:04 ` Sergey Senozhatsky
2018-10-19 22:03 ` Calvin Owens
0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2018-10-19 0:04 UTC (permalink / raw)
To: Calvin Owens
Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt, linux-api,
linux-doc, linux-kernel, kernel-team
On (09/28/17 17:43), Calvin Owens wrote:
> Not all consoles are created equal: depending on the actual hardware,
> the latency of a printk() call can vary dramatically. The worst examples
> are serial consoles, where it can spin for tens of milliseconds banging
> the UART to emit a message, which can cause application-level problems
> when the kernel spews onto the console.
>
> At Facebook we use netconsole to monitor our fleet, but we still have
> serial consoles attached on each host for live debugging, and the latter
> has caused problems. An obvious solution is to disable the kernel
> console output to ttyS0, but this makes live debugging frustrating,
> since crashes become silent and opaque to the ttyS0 user. Enabling it on
> the fly when needed isn't feasible, since boxes you need to debug via
> serial are likely to be borked in ways that make this impossible.
>
> That puts us between a rock and a hard place: we'd love to set
> kernel.printk to KERN_INFO and get all the logs. But while netconsole is
> fast enough to permit that without perturbing userspace, ttyS0 is not,
> and we're forced to limit console logging to KERN_WARNING and higher.
>
> This patch introduces a new per-console loglevel setting, and changes
> console_unlock() to use max(global_level, per_console_level) when
> deciding whether or not to emit a given log message.
>
> This lets us have our cake and eat it too: instead of being forced to
> limit all consoles verbosity based on the speed of the slowest one, we
> can "promote" the faster console while still using a conservative system
> loglevel setting to avoid disturbing applications.
Hi Calvin,
Do you have time to address the review feedback and re-spin v2?
-ss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] printk: Introduce per-console loglevel setting
2018-10-19 0:04 ` [PATCH 1/3] printk: Introduce per-console loglevel setting Sergey Senozhatsky
@ 2018-10-19 22:03 ` Calvin Owens
2018-10-22 2:37 ` Sergey Senozhatsky
0 siblings, 1 reply; 3+ messages in thread
From: Calvin Owens @ 2018-10-19 22:03 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt,
linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, Kernel Team
On Friday 10/19 at 09:04 +0900, Sergey Senozhatsky wrote:
> On (09/28/17 17:43), Calvin Owens wrote:
> > Not all consoles are created equal: depending on the actual hardware,
> > the latency of a printk() call can vary dramatically. The worst examples
> > are serial consoles, where it can spin for tens of milliseconds banging
> > the UART to emit a message, which can cause application-level problems
> > when the kernel spews onto the console.
> >
> > At Facebook we use netconsole to monitor our fleet, but we still have
> > serial consoles attached on each host for live debugging, and the latter
> > has caused problems. An obvious solution is to disable the kernel
> > console output to ttyS0, but this makes live debugging frustrating,
> > since crashes become silent and opaque to the ttyS0 user. Enabling it on
> > the fly when needed isn't feasible, since boxes you need to debug via
> > serial are likely to be borked in ways that make this impossible.
> >
> > That puts us between a rock and a hard place: we'd love to set
> > kernel.printk to KERN_INFO and get all the logs. But while netconsole is
> > fast enough to permit that without perturbing userspace, ttyS0 is not,
> > and we're forced to limit console logging to KERN_WARNING and higher.
> >
> > This patch introduces a new per-console loglevel setting, and changes
> > console_unlock() to use max(global_level, per_console_level) when
> > deciding whether or not to emit a given log message.
> >
> > This lets us have our cake and eat it too: instead of being forced to
> > limit all consoles verbosity based on the speed of the slowest one, we
> > can "promote" the faster console while still using a conservative system
> > loglevel setting to avoid disturbing applications.
>
> Hi Calvin,
>
> Do you have time to address the review feedback and re-spin v2?
Hi Sergey,
It's in-progress, I'm sorry it hasn't happened sooner.
By embedding the kobject in the console struct, we end up needing to refactor
the console drivers to use the kobject refcount instead of simply calling
kfree(), which is what I'm working on. It ends up being tedious but not
particularly complicated, my goal is to have this up soon :)
Thanks,
Calvin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] printk: Introduce per-console loglevel setting
2018-10-19 22:03 ` Calvin Owens
@ 2018-10-22 2:37 ` Sergey Senozhatsky
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2018-10-22 2:37 UTC (permalink / raw)
To: Calvin Owens
Cc: Sergey Senozhatsky, Petr Mladek, Sergey Senozhatsky,
Steven Rostedt, linux-api@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Kernel Team
On (10/19/18 22:03), Calvin Owens wrote:
> Hi Sergey,
>
> It's in-progress, I'm sorry it hasn't happened sooner.
Great!
> By embedding the kobject in the console struct, we end up needing to refactor
> the console drivers to use the kobject refcount instead of simply calling
> kfree(), which is what I'm working on. It ends up being tedious but not
> particularly complicated, my goal is to have this up soon :)
OK :)
-ss
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-22 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <08c1dc1a96afd6b6aecc5ff3c7c0e62c36670893.1506644730.git.calvinowens@fb.com>
2018-10-19 0:04 ` [PATCH 1/3] printk: Introduce per-console loglevel setting Sergey Senozhatsky
2018-10-19 22:03 ` Calvin Owens
2018-10-22 2:37 ` Sergey Senozhatsky
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).