Messages in this thread | ![/](/images/icornerl.gif) | | From | Lai Jiangshan <> | Date | Wed, 24 Jan 2024 10:54:26 +0800 | Subject | Re: [PATCH 9/9] workqueue: Implement system-wide nr_active enforcement for unbound workqueues |
| |
Hello, Tejun
On Wed, Jan 24, 2024 at 8:30 AM Tejun Heo <tj@kernel.org> wrote:
> > > /** > > > * pwq_activate_first_inactive - Activate the first inactive work item on a pwq > > > * @pwq: pool_workqueue of interest > > > + * @fill: max_active may have increased, try to increase concurrency level > > > > I think it is also legitimate to increase the concurrency level ASAP > > when called from try_to_grab_pending() path. > > Can you elaborate why that'd be useful? >
If an active item for a PWQ is canceled, the PWQ will lose a hard-earned nr_active and have to wait on the round-robbin queue for another nr_active.
It seems it is unfair for this PWQ. If a user's program pattern is queuing-checking-cancelling items, it can cause delays for other users sharing the same workqueue.
Thanks Lai
| ![\](/images/icornerr.gif) |