From: Byungchul Park <byungchul.park@lge.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: akpm@linux-foundation.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, akinobu.mita@gmail.com,
jack@suse.cz, peter@hurleysoftware.com, tglx@linutronix.de,
peterz@infradead.org, rostedt@goodmis.org
Subject: Re: [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred
Date: Mon, 14 Mar 2016 13:45:36 +0900 [thread overview]
Message-ID: <20160314044536.GG5220@X58A-UD3R> (raw)
In-Reply-To: <20160314012157.GA8074@swordfish>
On Mon, Mar 14, 2016 at 10:21:57AM +0900, Sergey Senozhatsky wrote:
> Hello Byungchul,
>
> Sorry, I'll make sure I Cc you next time. Jan Kara's updated patch set
>
> http://marc.info/?l=linux-kernel&m=145787625506342
Hello Sergey,
It would be appreciated if you or Jan Cc me from now.
>
> it's quite close to what you have done in this patch, but Jan's
> patch also solves a number of more likely to happen cases.
>
> have time to take a look?
I checked it now. I hope it will be accepted, then I can work mine based on
the Jan's patch.
>
> the lock debug patch in your series is different. can we settle
> down async printk first and then return to it? it's not so simple...
>
>
> On (03/11/16 19:37), Byungchul Park wrote:
> [..]
> > int printk_deferred(const char *fmt, ...)
> > {
> > va_list args;
> > int r;
> >
> > preempt_disable();
> > +
> > va_start(args, fmt);
> > - r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args);
> > + r = vprintk_deferred(fmt, args);
> > va_end(args);
> > + printk_pending_output();
> >
> > - __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
> > - irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
> > preempt_enable();
> >
> > return r;
>
> vprintk_deferred() does vprintk_emit()->{spin_lock()} again? cosole_lock() is
> moved out of sight, but logbug_lock is still there. wouldn't this (in the worst
We have to ensure the critical section by logbug_lock will not call
printk() or try to obtain the lock again. Current code works well in those
regards. logbuf_lock is not the thing we have to care when considering
the problem this patch deal with.
What do you think?
> case) result in endless loop after all? sorry if I'm missing something.
As long as we ensure it, the endless loop by logbuf_lock cannot happen.
>
> -ss
next prev parent reply other threads:[~2016-03-14 4:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 10:37 [PATCH v6 0/2] Make printing of spin_dump() deferred to avoid a deadlock Byungchul Park
2016-03-11 10:37 ` [PATCH v6 1/2] printk: Factor out buffering and irq work queuing in printk_deferred Byungchul Park
2016-03-14 1:21 ` Sergey Senozhatsky
2016-03-14 4:45 ` Byungchul Park [this message]
2016-03-11 10:37 ` [PATCH v6 2/2] printk: Make printing of spin_dump() deferred to avoid a deadlock Byungchul Park
2016-03-14 1:37 ` Sergey Senozhatsky
2016-03-14 2:30 ` Byungchul Park
2016-03-14 2:40 ` Sergey Senozhatsky
2016-03-14 4:17 ` Byungchul Park
2016-03-16 2:06 ` Byungchul Park
2016-03-18 5:55 ` [PATCH] lib/spinlock_debug: Prevent a unnecessary recursive spin_dump() Byungchul Park
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=20160314044536.GG5220@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peter@hurleysoftware.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=tglx@linutronix.de \
/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