public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH printk v3 0/7] provide nbcon base
@ 2023-09-03 15:05 John Ogness
  2023-09-03 15:05 ` [PATCH printk v3 1/7] printk: Add non-BKL (nbcon) console basic infrastructure John Ogness
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: John Ogness @ 2023-09-03 15:05 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Sergey Senozhatsky, Steven Rostedt, Thomas Gleixner, linux-kernel,
	Greg Kroah-Hartman

Hi,

This is v3 of a series to introduce the new non-BKL (nbcon)
consoles. v2 is here [0]. For information about the motivation
of the atomic consoles, please read the cover letter of v1 [1].

This series focuses on providing the base functionality of the
nbcon consoles. In particular, it implements the ownership and
priority semantics for nbcon consoles. This series does _not_
include threaded printing, atomic printing regions, or nbcon
drivers. Those features will be added in separate follow-up
series.

The changes since v2:

- rename nbcon_state::hostile_unsafe to
  nbcon_state::unsafe_takeover

- add 2-bit nbcon_state::req_tag to help identify waiters

- remove nbcon_context::unsafe

- remove nbcon_context::hostile

- rename nbcon_context::takeover_unsafe to
  nbcon_context::allow_unsafe_takeover

- callers must now check the current console state to see if it
  acquired the console using the unsafe hostile takeover method

- rename nbcon_write_context::hostile_unsafe to
  nbcon_write_context::unsafe_takeover

- allow direct takeover of owned consoles if higher priority
  and safe

- rename printk_nbcon.c to nbcon.c

- remove most printk.c changes, to be added in a later series
  once all the nbcon functionality is implemented (only init
  and seq updates/checks are kept)

- add nbcon_alloc() to be called early in register_console() to
  allow for simple backout on failure (nbcon_init() changed to
  return void)

- remove my special debugging because it was annoying

- rename __nbcon_seq_to_stored() to __seq_to_nbcon_seq()

- rename __nbcon_seq_to_full() to __nbcon_seq_to_seq()

- implement seq translation as suggested by pmladek

- in nbcon_seq_try_update(), unconditionally attempt cmpxchg to
  allow CONSOLE_REPLAY_ALL to work

- change semantics of all acquire methods to simplify the model

- add nbcon_waiter_matches() to check waiter based on prio and
  req_tag

- add nbcon_context_try_acquire_requested() to implement
  handover part of acquiring after setting request

- in nbcon_context_update_unsafe(), perform handover when
  transitioning to !unsafe and there is a waiter

- in nbcon_emit_next_record(), simplify initializing @wctxt

- in nbcon_emit_next_record(), set the console state to unsafe
  while updating @dropped and @nbcon_seq to avoid data race
  when not in panic

- cleanup comments as suggested by pmladek

John Ogness

[0] https://lore.kernel.org/lkml/20230728000233.50887-1-john.ogness@linutronix.de

[1] https://lore.kernel.org/lkml/20230302195618.156940-6-john.ogness@linutronix.de

Thomas Gleixner (7):
  printk: Add non-BKL (nbcon) console basic infrastructure
  printk: nbcon: Add acquire/release logic
  printk: nbcon: Add buffer management
  printk: nbcon: Add ownership state functions
  printk: nbcon: Add sequence handling
  printk: nbcon: Add emit function and callback function for atomic
    printing
  printk: nbcon: Add functions for drivers to mark unsafe regions

 include/linux/console.h  | 135 ++++++
 kernel/printk/Makefile   |   2 +-
 kernel/printk/internal.h |  29 ++
 kernel/printk/nbcon.c    | 945 +++++++++++++++++++++++++++++++++++++++
 kernel/printk/printk.c   |  60 ++-
 5 files changed, 1152 insertions(+), 19 deletions(-)
 create mode 100644 kernel/printk/nbcon.c


base-commit: cb65d08d735e00cc55ad7700a82a453bb88c93a3
-- 
2.39.2


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-09-08 13:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 15:05 [PATCH printk v3 0/7] provide nbcon base John Ogness
2023-09-03 15:05 ` [PATCH printk v3 1/7] printk: Add non-BKL (nbcon) console basic infrastructure John Ogness
2023-09-05 11:45   ` Petr Mladek
2023-09-03 15:05 ` [PATCH printk v3 2/7] printk: nbcon: Add acquire/release logic John Ogness
2023-09-03 16:32   ` kernel test robot
2023-09-05  9:07     ` John Ogness
2023-09-03 16:43   ` kernel test robot
2023-09-06 13:01   ` Petr Mladek
2023-09-03 15:05 ` [PATCH printk v3 3/7] printk: nbcon: Add buffer management John Ogness
2023-09-06 13:26   ` Petr Mladek
2023-09-08 13:03     ` John Ogness
2023-09-03 15:05 ` [PATCH printk v3 4/7] printk: nbcon: Add ownership state functions John Ogness
2023-09-06 13:57   ` Petr Mladek
2023-09-08 13:20     ` John Ogness
2023-09-03 15:05 ` [PATCH printk v3 5/7] printk: nbcon: Add sequence handling John Ogness
2023-09-07  7:45   ` Petr Mladek
2023-09-03 15:05 ` [PATCH printk v3 6/7] printk: nbcon: Add emit function and callback function for atomic printing John Ogness
2023-09-07  8:22   ` Petr Mladek
2023-09-03 15:05 ` [PATCH printk v3 7/7] printk: nbcon: Add functions for drivers to mark unsafe regions John Ogness
2023-09-07  8:24   ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox