From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Jann Horn <jannh@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
linux-kernel@vger.kernel.org, Dennis Zhou <dennis@kernel.org>,
Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH 0/2] Make printk_deferred() work properly before percpu setup is done
Date: Fri, 27 Mar 2020 11:45:00 +0900 [thread overview]
Message-ID: <20200327024500.GA211096@google.com> (raw)
In-Reply-To: <20200326163245.119670-1-jannh@google.com>
On (20/03/26 17:32), Jann Horn wrote:
> While I was doing some development work, I noticed that if you call
> printk_deferred() before percpu setup has finished, stuff breaks, and
> e.g. "dmesg -w" fails to print new messages.
>
> This happens because writing to percpu memory before percpu
> initialization is done causes the modified percpu memory to be
> propagated from the boot CPU to all the secondary CPUs; and both the
> printk code as well as the irq_work implementation use percpu memory.
>
> I think that printk_deferred() ought to work even before percpu
> initialization, since it is used by things like pr_warn_ratelimited()
> and the unwinder infrastructure. I'm not entirely sure though whether
> this is the best way to implement that, or whether it would be better to
> let printk_deferred() do something different if it is called during
> early boot.
Hi Jann,
I believe we have a patch for this issue
https://lore.kernel.org/lkml/20200303113002.63089-1-sergey.senozhatsky@gmail.com/
-ss
next prev parent reply other threads:[~2020-03-27 2:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 16:32 [PATCH 0/2] Make printk_deferred() work properly before percpu setup is done Jann Horn
2020-03-26 16:32 ` [PATCH 1/2] irq_work: Reinitialize list heads for secondary CPUs Jann Horn
2020-03-26 16:32 ` [PATCH 2/2] printk: Reinitialize klogd percpu state " Jann Horn
2020-03-27 2:45 ` Sergey Senozhatsky [this message]
2020-03-27 3:05 ` [PATCH 0/2] Make printk_deferred() work properly before percpu setup is done Jann Horn
2020-03-27 3:11 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200327024500.GA211096@google.com \
--to=sergey.senozhatsky.work@gmail.com \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=frederic@kernel.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).