lkml.org 
[lkml]   [2016]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v4 1/2] printk: Make printk() completely async
On (03/16/16 16:30), Byungchul Park wrote:
>
> Do you mean the wake_up_process() in console_unlock?

no, I meant wake_up_process(printk_kthread), the newly added one.


-- if we are going to have wake_up_process() in wake_up_klogd_work_func(),
then we need `in_sched' message to potentially trigger a recursion chain

wake_up_klogd_work_func()->wake_up_process()->printk()->wake_up_process()->printk()...

to break this printk()->wake_up_process()->printk(), we need wake_up_process() to
be under the logbuf lock; so vprintk_emit()'s if (logbuf_cpu == this_cpu) will act.


-- if we are going to have wake_up_process() in console_unlock(), then

console_unlock()->{up(), wake_up_process()}->printk()->{console_lock(), console_unlock()}->{up(), wake_up_process()}->printk()...

is undetectable... by the time console_unlock() calls wake_up_process() there
are no printk() locks that this CPU owns.


> I said they should be kept *out of* the critical section. :-)
> Otherwise, it can recurse us forever.

can you explain?

-ss

\
 
 \ /
  Last update: 2016-03-16 09:21    [W:0.081 / U:1.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site