[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS8s9ESMrbeTu_Zd@slm.duckdns.org>
Date: Tue, 2 Dec 2025 08:16:20 -1000
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org, ying chen <yc1082463@...il.com>,
Lai Jiangshan <jiangshan.ljs@...group.com>
Subject: Re: [PATCH V4 3/4] workqueue: Limit number of processed works in
rescuer per turn
On Tue, Nov 25, 2025 at 02:36:16PM +0800, Lai Jiangshan wrote:
...
> + while (assign_rescuer_work(pwq, rescuer, ++count > RESCUER_BATCH))
> process_scheduled_works(rescuer);
Can we something like the following instead?
while (assign_rescuer_work(pwq, rescuer, &count))
It just feels odd to for the caller to decide "you should stop" and then
taking actions on the return value of the callee. Alternatively, just
separate out the pwq rotation into a separate function, so that the caller
can do
while (assign_rescuer_work(..)) {
process_scheduled_works(rescuer);
if (++count > RESCUER_BATCH) {
rotate mayday list;
break;
}
}
Thanks.
--
tejun
Powered by blists - more mailing lists