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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240130102011.rX9Qjnp1@linutronix.de>
Date: Tue, 30 Jan 2024 11:20:11 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Tejun Heo <tj@...nel.org>
Cc: torvalds@...ux-foundation.org, mpatocka@...hat.com,
	linux-kernel@...r.kernel.org, dm-devel@...ts.linux.dev,
	msnitzer@...hat.com, ignat@...udflare.com, damien.lemoal@....com,
	bob.liu@...cle.com, houtao1@...wei.com, peterz@...radead.org,
	mingo@...nel.org, netdev@...r.kernel.org, allen.lkml@...il.com,
	kernel-team@...a.com, tglx@...utronix.de
Subject: Re: [PATCHSET wq/for-6.9] workqueue: Implement BH workqueue and
 convert several tasklet users

On 2024-01-29 23:11:47 [-1000], Tejun Heo wrote:
> Hello,
Hi,

> As suggested, this patchset implements BH workqueues which are like regular
> workqueues but executes work items in the BH (softirq) context and converts
> several tasklet users.
> 
> - The name bh is used instead of the suggested atomic as it's more in line
>   with widely used execution context interface - local_bh_enable/disable()
>   and friends.
> 
> - The system default BH workqueues - system_bh_wq and system_bh_highpri_wq -
>   are provided. As queue-wide flushing doesn't exist in tasklet, all
>   existing tasklet users should be able to use the system BH workqueues
>   without creating their own.
> 
> - BH workqueues currently use tasklet to run the work items to avoid
>   priority inversions involving tasklet_hi and WQ_BH | WQ_HIGHPRI. Once all
>   tasklet users are converted, tasklet code can be removed and BH workqueues
>   can take over its softirqs.

If one context creates multiple work item which are then moved to
tasklet I don't see the difference vs workqueue with a bh_disable()
around it.
Looking at the USB changes, I would prefer to see it converted to
threaded interrupts instead of using tasklet or workqueue. Both
approaches (current tasklet, suggested workqueue) lose the original
context where the request was created. Having threaded interrupts would
allow to keep everything in the same "context" so you could prioritize
according to your needs.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ