lkml.org 
[lkml]   [2017]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv2 8/8] printk: enable printk offloading
On Wed 2017-03-29 18:25:11, Sergey Senozhatsky wrote:
> Initialize the kernel printing thread and enable printk()
> offloading.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> ---
> kernel/printk/printk.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 0d96839bb450..acfdc50580db 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2796,6 +2796,25 @@ static int printk_kthread_func(void *data)
> return 0;
> }
>
> +/*
> + * Init printk kthread at late_initcall stage, after core/arch/device/etc.
> + * initialization.
> + */
> +static int __init init_printk_kthread(void)
> +{
> + struct task_struct *thread;
> +
> + thread = kthread_run(printk_kthread_func, NULL, "printk");
> + if (IS_ERR(thread)) {
> + pr_err("printk: unable to create printing thread\n");
> + return PTR_ERR(thread);
> + }
> +
> + printk_kthread = thread;
> + return 0;
> +}
> +late_initcall(init_printk_kthread);

I like the simplicity. I just wonder if people on tiny devices might
want to disable it. In each case, it does not make sense on non-SMP
machines or when people force the emergency mode all the time.

I am not sure what is the practice here. I wonder if we should be
proactive or keep it as is and wait until anyone complains. IMHO,
it is not that big deal but...

Best Regards,
Petr

\
 
 \ /
  Last update: 2017-04-03 17:44    [W:0.109 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site