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


Groups > linux.kernel > #1711786

[RFC][PATCHv5 00/13] printk: introduce printing kernel thread

From Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Newsgroups linux.kernel
Subject [RFC][PATCHv5 00/13] printk: introduce printing kernel thread
Date 2017-08-15 05:00 +0200
Message-ID <ueAff-3Y4-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

        RFC

        This patch set adds a printk() kernel thread which let us
to print kernel messages to the console from a non-atomic/schedule-able
context, avoiding different sort of lockups, stalls, etc.

        Offloading threshold is now in "seconds spent in console_unlock()",
not in "lines printed", this lets us to be a little bit more 'watchdog-aware'
in printk. But we still can (and probably must) do better, tho. May be there
will be a new watchdog API some day, so will be able to make better decisions
in printk.

        And a whole bunch of other improvements and tweaks. Like preemption
in console_unlock(), and so on. Any comments and thoughts are appreciated.


v4->v5
-- split some of the patches
-- make offloading time-based (not number of lines printed)
-- move offloading control to per-CPU
-- remove a pessimistic offloading spin from console_unlock()
-- adjust printk_kthread CPU affinity mask
-- disable preemption in console_unlock()
-- always offload printing from user space processes
-- add sync version of emergency_begin API
-- offload from printk_kthread as well, to periodically up() console_sem
-- limit `atomic_print_limit' to `watchdog_thresh'
-- and some other changes...

v3->v4 (Petr, Jan)
-- add syscore notifiers
-- fix 0001 compilation warnings
-- use proper CPU notifiers return values

v2->v3 (Petr, Pavel, Andreas):
-- rework offloading
-- use PM notifiers
-- dropped some patches, etc. etc.

v1->v2:
-- introduce printk_emergency mode and API to switch it on/off
-- move printk_pending out of per-CPU memory
-- add printk emergency_mode sysfs node
-- switch sysrq handlers (some of them) to printk_emergency
-- cleanus/etc.

Sergey Senozhatsky (13):
  printk: move printk_pending out of per-cpu
  printk: introduce printing kernel thread
  printk: add sync printk_emergency API
  printk: add enforce_emergency parameter
  printk: enable printk offloading
  printk: register PM notifier
  printk: register syscore notifier
  printk: set watchdog_thresh as maximum value for atomic_print_limit
  printk: add auto-emergency enforcement mechanism
  printk: force printk_kthread to offload printing
  printk: always offload printing from user-space processes
  printk: do not cond_resched() when we can offload
  printk: move offloading logic to per-cpu

 Documentation/admin-guide/kernel-parameters.txt |  17 +
 include/linux/console.h                         |   5 +
 kernel/printk/printk.c                          | 435 ++++++++++++++++++++++--
 3 files changed, 433 insertions(+), 24 deletions(-)

-- 
2.14.1

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


Thread

[RFC][PATCHv5 00/13] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:00 +0200
  [RFC][PATCHv5 12/13] printk: do not cond_resched() when we can offload Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 10/13] printk: force printk_kthread to offload printing Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 04/13] printk: add enforce_emergency parameter Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 07/13] printk: register syscore notifier Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
    Re: [RFC][PATCHv5 07/13] printk: register syscore notifier "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-15 14:10 +0200
      Re: [RFC][PATCHv5 07/13] printk: register syscore notifier Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-16 09:00 +0200
        Re: [RFC][PATCHv5 07/13] printk: register syscore notifier "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-16 15:10 +0200
  [RFC][PATCHv5 11/13] printk: always offload printing from user-space processes Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 05/13] printk: enable printk offloading Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 01/13] printk: move printk_pending out of per-cpu Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 02/13] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 08/13] printk: set watchdog_thresh as maximum value for atomic_print_limit Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 03/13] printk: add sync printk_emergency API Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 09/13] printk: add auto-emergency enforcement mechanism Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 13/13] printk: move offloading logic to per-cpu Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
  [RFC][PATCHv5 06/13] printk: register PM notifier Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-08-15 05:10 +0200
    Re: [RFC][PATCHv5 06/13] printk: register PM notifier "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-15 14:00 +0200
      Re: [RFC][PATCHv5 06/13] printk: register PM notifier Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-16 09:40 +0200
        Re: [RFC][PATCHv5 06/13] printk: register PM notifier "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-16 15:10 +0200
          Re: [RFC][PATCHv5 06/13] printk: register PM notifier Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-17 08:00 +0200
            Re: [RFC][PATCHv5 06/13] printk: register PM notifier "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-17 18:00 +0200
              Re: [RFC][PATCHv5 06/13] printk: register PM notifier Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-18 01:20 +0200
  Re: [RFC][PATCHv5 00/13] printk: introduce printing kernel thread Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-23 10:40 +0200

csiph-web