Messages in this thread | | | Date | Mon, 9 Jan 2023 15:23:39 +0100 | From | Petr Mladek <> | Subject | Re: [PATCH printk v5 7/8] printk: use printk_buffers for devkmsg |
| |
On Mon 2023-01-09 11:13:59, John Ogness wrote: > Replace the buffers in struct devkmsg_user with a struct > printk_buffers. This reduces the number of buffers to keep track of. > > As a side-effect, @text_buf was 8kB large, even though it only > needed to be the max size of a ringbuffer record. By switching to > struct printk_buffers, ~7kB less memory is allocated when opening > /dev/kmsg. > > And since struct printk_buffers will be used now, reduce duplicate > code by calling printk_get_next_message() to handle the record > reading and formatting. > > Note that since /dev/kmsg never suppresses records based on > loglevel, printk_get_next_message() is extended with an extra > bool argument to specify if suppression is allowed. > > Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards, Petr
| |