lkml.org 
[lkml]   [2024]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2024-05-27 14:31    [W:0.072 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site