diff options
author | John Ogness <john.ogness@linutronix.de> | 2020-09-21 13:18:45 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-09-22 11:27:48 +0200 |
commit | 74caba7f2a0685575b3ee5330a118f5922485e02 (patch) | |
tree | eb195b5d665b166c8158af3bcdc151d2b84b447f /kernel/printk/printk_ringbuffer.h | |
parent | printk: move printk_info into separate array (diff) | |
download | linux-74caba7f2a0685575b3ee5330a118f5922485e02.tar.xz linux-74caba7f2a0685575b3ee5330a118f5922485e02.zip |
printk: move dictionary keys to dev_printk_info
Dictionaries are only used for SUBSYSTEM and DEVICE properties. The
current implementation stores the property names each time they are
used. This requires more space than otherwise necessary. Also,
because the dictionary entries are currently considered optional,
it cannot be relied upon that they are always available, even if the
writer wanted to store them. These issues will increase should new
dictionary properties be introduced.
Rather than storing the subsystem and device properties in the
dict ring, introduce a struct dev_printk_info with separate fields
to store only the property values. Embed this struct within the
struct printk_info to provide guaranteed availability.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/87mu1jl6ne.fsf@jogness.linutronix.de
Diffstat (limited to 'kernel/printk/printk_ringbuffer.h')
-rw-r--r-- | kernel/printk/printk_ringbuffer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h index 97c8561e74e0..480499ce3c6b 100644 --- a/kernel/printk/printk_ringbuffer.h +++ b/kernel/printk/printk_ringbuffer.h @@ -4,6 +4,7 @@ #define _KERNEL_PRINTK_RINGBUFFER_H #include <linux/atomic.h> +#include <linux/dev_printk.h> /* * Meta information about each stored message. @@ -21,6 +22,8 @@ struct printk_info { u8 flags:5; /* internal record flags */ u8 level:3; /* syslog level */ u32 caller_id; /* thread id or processor id */ + + struct dev_printk_info dev_info; }; /* |