mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cgroup/cpuset: simplify the percpu kthreads check in update_tasks_cpumask()
@ 2023-07-04 11:30 Miaohe Lin
  2023-07-05  3:14 ` Waiman Long
  2023-07-10 20:25 ` Tejun Heo
  0 siblings, 2 replies; 5+ messages in thread
From: Miaohe Lin @ 2023-07-04 11:30 UTC (permalink / raw)
  To: longman, tj, hannes, lizefan.x; +Cc: cgroups, linux-kernel, linmiaohe

kthread_is_per_cpu() can be called directly without checking whether
PF_KTHREAD is set in task->flags. So remove PF_KTHREAD check to make
code more concise.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 kernel/cgroup/cpuset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 58e6f18f01c1..601c40da8e03 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1230,7 +1230,7 @@ static void update_tasks_cpumask(struct cpuset *cs, struct cpumask *new_cpus)
 			/*
 			 * Percpu kthreads in top_cpuset are ignored
 			 */
-			if ((task->flags & PF_KTHREAD) && kthread_is_per_cpu(task))
+			if (kthread_is_per_cpu(task))
 				continue;
 			cpumask_andnot(new_cpus, possible_mask, cs->subparts_cpus);
 		} else {
-- 
2.33.0


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

end of thread, other threads:[~2023-07-10 20:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 11:30 [PATCH] cgroup/cpuset: simplify the percpu kthreads check in update_tasks_cpumask() Miaohe Lin
2023-07-05  3:14 ` Waiman Long
2023-07-05  5:56   ` Miaohe Lin
2023-07-05 14:49     ` Waiman Long
2023-07-10 20:25 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®