lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH printk v2 00/12] implement threaded console printing
    Date
    On 2022-04-05, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
    > From the list of patches and the only one I am Cc'ed to I can't find
    > the answer to my question,

    It seems lore is having trouble picking up the series. Until then, I've
    pushed the series to github.com so you can see the code.

    > i.e. does it take care about console_unregister() cases at run time?
    > (We have some drivers to call ->exit() for console in that case,
    > perhaps it should do something before calling it.)

    Yes. In console_unregister(), the printing thread is shutdown before the
    actual console unregistration takes place. The thread is shutdown here:

    https://github.com/Linutronix/linux/blob/b27eb6c3d168d608b3a9d04578e030a3d79d889a/kernel/printk/printk.c#L3393

    The console's exit() callback is below that:

    https://github.com/Linutronix/linux/blob/b27eb6c3d168d608b3a9d04578e030a3d79d889a/kernel/printk/printk.c#L3429

    > Would be nice to see some pointers where I can find the answer and
    > maybe even describing in the cover-letter/commit
    > message/documentation.

    I suppose for the console thread patch [0] I could add a paragraph to
    the commit message mentioning kernel thread shutdown for console
    unregistration.

    [0] https://github.com/Linutronix/linux/commit/e26ae677da2e339dd268c1f871b81e61e782393f

    John

    \
     
     \ /
      Last update: 2022-04-06 06:56    [W:3.853 / U:0.916 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site