From ee740a0bb8014e7981d6d179ce8579a685e8d1f4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 22 Nov 2021 11:02:39 +0100 Subject: [ANNOUNCE] v5.16-rc2-rt3 Signed-off-by: Sebastian Andrzej Siewior --- patches/Add_localversion_for_-RT_release.patch | 2 +- ...printk__move_console_printing_to_kthreads.patch | 48 ++++++++++++---------- patches/printk__remove_deferred_printing.patch | 13 ++++-- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/patches/Add_localversion_for_-RT_release.patch b/patches/Add_localversion_for_-RT_release.patch index d960d516454d..53b69a97ca19 100644 --- a/patches/Add_localversion_for_-RT_release.patch +++ b/patches/Add_localversion_for_-RT_release.patch @@ -15,4 +15,4 @@ Signed-off-by: Thomas Gleixner --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt2 ++-rt3 diff --git a/patches/printk__move_console_printing_to_kthreads.patch b/patches/printk__move_console_printing_to_kthreads.patch index 35c092e62f0d..09d10e9f656f 100644 --- a/patches/printk__move_console_printing_to_kthreads.patch +++ b/patches/printk__move_console_printing_to_kthreads.patch @@ -17,8 +17,8 @@ Signed-off-by: Thomas Gleixner --- include/linux/console.h | 12 - kernel/printk/printk.c | 715 ++++++++++++++---------------------------------- - 2 files changed, 235 insertions(+), 492 deletions(-) + kernel/printk/printk.c | 717 ++++++++++++++---------------------------------- + 2 files changed, 236 insertions(+), 493 deletions(-) --- --- a/include/linux/console.h +++ b/include/linux/console.h @@ -498,17 +498,27 @@ Signed-off-by: Thomas Gleixner + seq = read_console_seq(con); + + prb_rec_init_rd(&r, &info, text, LOG_LINE_MAX + PREFIX_MAX); -+ + +-#define printk_time false + for (;;) { + error = wait_event_interruptible(log_wait, + prb_read_valid(prb, seq, &r) || kthread_should_stop()); -+ + +-#define prb_read_valid(rb, seq, r) false +-#define prb_first_valid_seq(rb) 0 +-#define read_console_seq() 0 +-#define latched_seq_write(dst, src) +-#define kernel_sync_mode() false + if (kthread_should_stop()) + break; -+ + +-static u64 exclusive_console_stop_seq; +-static unsigned long console_dropped; + if (error) + continue; -+ + +-static size_t record_print_text(const struct printk_record *r, +- bool syslog, bool time) + if (seq != r.info->seq) { + dropped += r.info->seq - seq; + seq = r.info->seq; @@ -521,8 +531,7 @@ Signed-off-by: Thomas Gleixner + + if (suppress_message_printing(r.info->level)) + continue; - --#define printk_time false ++ + if (con->flags & CON_EXTENDED) { + len = info_print_ext_header(ext_text, + CONSOLE_EXT_LOG_MAX, @@ -536,12 +545,7 @@ Signed-off-by: Thomas Gleixner + console_msg_format & MSG_FORMAT_SYSLOG, + printk_time); + } - --#define prb_read_valid(rb, seq, r) false --#define prb_first_valid_seq(rb) 0 --#define read_console_seq() 0 --#define latched_seq_write(dst, src) --#define kernel_sync_mode() false ++ + console_lock(); + + /* @@ -558,17 +562,13 @@ Signed-off-by: Thomas Gleixner + console_unlock(); + break; + } - --static u64 exclusive_console_stop_seq; --static unsigned long console_dropped; ++ + if (!(con->flags & CON_EXTENDED) && dropped) { + dropped_len = snprintf(dropped_text, 64, + "** %lu printk messages dropped **\n", + dropped); + dropped = 0; - --static size_t record_print_text(const struct printk_record *r, -- bool syslog, bool time) ++ + con->write(con, dropped_text, dropped_len); + printk_delay(r.info->level); + } @@ -965,7 +965,7 @@ Signed-off-by: Thomas Gleixner } static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = -@@ -3401,13 +3139,6 @@ void wake_up_klogd(void) +@@ -3401,18 +3139,11 @@ void wake_up_klogd(void) void defer_console_output(void) { @@ -978,4 +978,10 @@ Signed-off-by: Thomas Gleixner - preempt_enable(); } + void printk_trigger_flush(void) + { +- defer_console_output(); ++ wake_up_klogd(); + } + int vprintk_deferred(const char *fmt, va_list args) diff --git a/patches/printk__remove_deferred_printing.patch b/patches/printk__remove_deferred_printing.patch index b8d59e2bf31b..e835184af5bf 100644 --- a/patches/printk__remove_deferred_printing.patch +++ b/patches/printk__remove_deferred_printing.patch @@ -198,7 +198,7 @@ Signed-off-by: Thomas Gleixner * Please don't use printk_ratelimit(), because it shares ratelimiting state * with all other unrelated printk_ratelimit() callsites. Instead use * printk_ratelimited() or plain old __ratelimit(). -@@ -215,19 +200,6 @@ int _printk(const char *s, ...) +@@ -216,19 +201,6 @@ int _printk(const char *s, ...) { return 0; } @@ -218,7 +218,7 @@ Signed-off-by: Thomas Gleixner static inline int printk_ratelimit(void) { -@@ -471,8 +443,6 @@ struct pi_entry { +@@ -475,8 +447,6 @@ struct pi_entry { * See the vsnprintf() documentation for format string extensions over C99. */ #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) @@ -227,7 +227,7 @@ Signed-off-by: Thomas Gleixner /** * pr_emerg - Print an emergency-level message -@@ -610,13 +580,9 @@ struct pi_entry { +@@ -614,13 +584,9 @@ struct pi_entry { #ifdef CONFIG_PRINTK #define printk_once(fmt, ...) \ DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__) @@ -459,7 +459,7 @@ Signed-off-by: Thomas Gleixner asmlinkage __visible int _printk(const char *fmt, ...) { -@@ -3137,32 +3139,6 @@ void wake_up_klogd(void) +@@ -3137,37 +3139,11 @@ void wake_up_klogd(void) preempt_enable(); } @@ -467,6 +467,11 @@ Signed-off-by: Thomas Gleixner -{ -} - + void printk_trigger_flush(void) + { + wake_up_klogd(); + } + -int vprintk_deferred(const char *fmt, va_list args) -{ - int r; -- cgit v1.2.1