From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nicolai Stange <nstange@suse.de>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] RFC: x86/smp: use printk_deferred in native_smp_send_reschedule
Date: Wed, 8 May 2019 17:24:31 +0900 [thread overview]
Message-ID: <20190508082431.GA21654@jagdpanzerIV> (raw)
In-Reply-To: <CAKMK7uFeRmSGkqFj-xmdebwKok9+z1pyDZWUMNXfzTT4H2=-fA@mail.gmail.com>
On (05/08/19 10:06), Daniel Vetter wrote:
[..]
> > Any printk-related patch in this area will make PeterZ really-really
> > angry :)
>
> Hm any more context for someone with no clue about this? Just that the
> dependencies are already terribly complex and it's not going to get
> better, or something more specific?
The main problem is that it's a deferred error-reporting, so such
a report has chances to never be reported. It's not like 'normal'
printk() is always guaranteed to immediately start printing; sometimes
it will, sometimes it won't, and sometimes it never will, for instance
when console_sem was locked by offline-ed CPU.
An example of PeterZ's opinion on printk_deferred()
/* message ID: 20181122101606.GP2131@hirez.programming.kicks-ass.net */
| No, printk_deferred() is a disease, it needs to be eradicated, not
| spread around.
> > printk_deferred(), just like prinkt_safe(), depends on IRQ work;
> > printk_safe(), however, can redirect multiple lines, unlike
> > printk_deferred(). So if you want to keep the backtrace, you may
> > do something like
> >
> > if (unlikely(cpu_is_offline(cpu))) {
> > printk_safe_enter(...);
> > WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n",
> > cpu);
> > printk_safe_exit(...);
> > return;
> > }
> >
> > I think, in this case John's reworked-printk can do better than
> > printk_safe/printk_deferred.
>
> Hm I think this is what Petr was suggesting, but somehow I didn't find
> the printk_safe_* functions and didn't connect the dots.
These are in kernel/printk/printk_safe.c as of now.
> Needs the _irqsave variants I guess, I'll respin a v2 of this.
Let's wait a bit before respin.
-ss
next prev parent reply other threads:[~2019-05-08 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 17:33 [PATCH] RFC: x86/smp: use printk_deferred in native_smp_send_reschedule Daniel Vetter
2019-05-08 7:44 ` Sergey Senozhatsky
2019-05-08 7:53 ` Sergey Senozhatsky
2019-05-08 8:06 ` Daniel Vetter
2019-05-08 8:24 ` Sergey Senozhatsky [this message]
2019-05-08 8:14 ` Daniel Vetter
2019-05-08 8:25 ` Daniel Vetter
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=20190508082431.GA21654@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nstange@suse.de \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/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