lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v8xpmx9n.fsf@jogness.linutronix.de>
Date:   Tue, 08 Feb 2022 12:14:04 +0106
From:   John Ogness <john.ogness@...utronix.de>
To:     Hillf Danton <hdanton@...a.com>
Cc:     Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH printk v1 10/13] printk: add kthread console printers

On 2022-02-08, Hillf Danton <hdanton@...a.com> wrote:
> On Mon,  7 Feb 2022 20:49:20 +0106 John Ogness wrote:
>> Create a kthread for each console to perform console printing. During
>> normal operation (@system_state == SYSTEM_RUNNING), the kthread
>> printers are responsible for all printing on their respective
>> consoles.
>
> The code becomes simpler if the kthread is replaced with a workqueue
> work, given the system workers.

We do not want multiple console printers blocking each other. We also
would not want the consoles blocking non-printk work items for extended
periods of time. So we would likely need a dedicated worker per
console. I'm not convinced the code would look simpler just by changing
the deferred work API. But perhaps the kernel community wants to get
away from manual kthread management in general. (??)

I am now pondering if there is some technical advantages to
workqueues. I suppose with dedicated workers, you could still easily
adjust CPU affinities and scheduling policies/priorites from userspace,
like with kthreads. But is there some advantage over kthreads?

John Ogness

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ