[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEagR7GYUsPN46wm@slm.duckdns.org>
Date: Mon, 24 Apr 2023 05:29:11 -1000
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: torvalds@...ux-foundation.org, peterz@...radead.org,
linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH 4/5] workqueue: Automatically mark CPU-hogging work items
CPU_INTENSIVE
Hello, Lai.
On Sun, Apr 23, 2023 at 11:23:28AM +0800, Lai Jiangshan wrote:
> wq_worker_stopping() and sched_submit_work() are only called from
> schedule() and are not called for other various kinds of scheduling,
> such as schedule_rtlock(), preempt_schedule_*(), __cond_resched().
>
> A work item hogging CPU may not call the bare schedule(). To make
> the new wq_worker_stopping() works, it has to be added to other kinds
> of scheduling, IMO.
Yeah, you're right. The proposed code would work fine only on !preempt
kernels. I guess the right thing to do is splitting out the hook for
non-sleeping schedulers and adding them in those paths. I'll look into it.
Thanks for spotting the issue.
--
tejun
Powered by blists - more mailing lists