[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YBf/XUmgflhMHtBx@alley>
Date: Mon, 1 Feb 2021 14:17:17 +0100
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk-rework 08/12] printk: introduce a kmsg_dump
iterator
On Tue 2021-01-26 22:21:47, John Ogness wrote:
> Rather than store the iterator information into the registered
> kmsg_dump structure, create a separate iterator structure. The
> kmsg_dump_iter structure can reside on the stack of the caller,
> thus allowing lockless use of the kmsg_dump functions.
>
> This is in preparation for removal of @logbuf_lock.
> diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h
> index 76cc4122d08e..ecc98f549d93 100644
> --- a/include/linux/kmsg_dump.h
> +++ b/include/linux/kmsg_dump.h
> @@ -29,6 +29,18 @@ enum kmsg_dump_reason {
> KMSG_DUMP_MAX
> };
>
> +/**
> + * struct kmsg_dumper_iter - iterator for kernel crash message dumper
> + * @active: Flag that specifies if this is currently dumping
> + * @cur_seq: The record to dump (private)
> + * @next_seq: The first record of the next block (private)
Just to be sure. This description should get update if you agree with
the alternative one in the 1st patch.
> + */
> +struct kmsg_dumper_iter {
> + bool active;
> + u64 cur_seq;
> + u64 next_seq;
> +};
> +
Otherwise, I like this change.
Best Regards,
Petr
Powered by blists - more mailing lists