[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170525121107.GG26699@pathway.suse.cz>
Date: Thu, 25 May 2017 14:11:07 +0200
From: Petr Mladek <pmladek@...e.com>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Eric Biederman <ebiederm@...ssion.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, Pavel Machek <pavel@....cz>,
Andreas Mohr <andi@...as.de>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [RFC][PATCHv3 1/5] printk: move printk_pending out of per-cpu
On Tue 2017-05-09 17:28:55, Sergey Senozhatsky wrote:
> Do not keep `printk_pending' in per-CPU area. We set the following bits
> of printk_pending:
> a) PRINTK_PENDING_WAKEUP
> when we need to wakeup klogd
> b) PRINTK_PENDING_OUTPUT
> when there is a pending output from deferred printk and we need
> to call console_unlock().
>
> So none of the bits control/represent a state of a particular CPU and,
> basically, they should be global instead.
>
> Besides we will use `printk_pending' to control printk kthread, so this
> patch is also a preparation work.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Suggested-by: Petr Mladek <pmladek@...e.com>
> ---
> kernel/printk/printk.c | 26 ++++++++++++--------------
> 1 file changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index a1aecf44ab07..2cb7f4753b76 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -401,6 +401,14 @@ DEFINE_RAW_SPINLOCK(logbuf_lock);
> printk_safe_exit_irqrestore(flags); \
> } while (0)
>
> +/*
> + * Delayed printk version, for scheduler-internal messages:
> + */
> +#define PRINTK_PENDING_WAKEUP 0x01
> +#define PRINTK_PENDING_OUTPUT 0x02
> +
> +static unsigned long printk_pending;
> +
> #ifdef CONFIG_PRINTK
The variable is used only when CONFIG_PRINTK is defined at
the moment, so this produces a warning about an unused variable.
Otherwise, the patch looks fine to me.
Best Regards,
Petr
Powered by blists - more mailing lists