LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] workqueue: fix the comments of nr_idle
@ 2018-03-20  9:24 Lai Jiangshan
  2018-03-20 20:06 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2018-03-20  9:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Lai Jiangshan, Tejun Heo

Since the worker rebinding behavior was refactored, there is
no idle worker off the idle_list now. The comment is outdated
and can be just removed.

It also groups nr_workers and nr_idle together.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
---
 kernel/workqueue.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index bb9a519cbf50..19785a092026 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -153,10 +153,9 @@ struct worker_pool {
 	unsigned long		watchdog_ts;	/* L: watchdog timestamp */
 
 	struct list_head	worklist;	/* L: list of pending works */
-	int			nr_workers;	/* L: total number of workers */
 
-	/* nr_idle includes the ones off idle_list for rebinding */
-	int			nr_idle;	/* L: currently idle ones */
+	int			nr_workers;	/* L: total number of workers */
+	int			nr_idle;	/* L: currently idle workers */
 
 	struct list_head	idle_list;	/* X: list of idle workers */
 	struct timer_list	idle_timer;	/* L: worker idle timeout */
-- 
2.14.3 (Apple Git-98)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] workqueue: fix the comments of nr_idle
  2018-03-20  9:24 [PATCH] workqueue: fix the comments of nr_idle Lai Jiangshan
@ 2018-03-20 20:06 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2018-03-20 20:06 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: linux-kernel

On Tue, Mar 20, 2018 at 05:24:05PM +0800, Lai Jiangshan wrote:
> Since the worker rebinding behavior was refactored, there is
> no idle worker off the idle_list now. The comment is outdated
> and can be just removed.
> 
> It also groups nr_workers and nr_idle together.
> 
> Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>

Applied to wq/for-4.17.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-20 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-20  9:24 [PATCH] workqueue: fix the comments of nr_idle Lai Jiangshan
2018-03-20 20:06 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).