From: Miaohe Lin <linmiaohe@huawei.com>
To: <longman@redhat.com>, <tj@kernel.org>, <hannes@cmpxchg.org>,
<lizefan.x@bytedance.com>
Cc: <cgroups@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linmiaohe@huawei.com>
Subject: [PATCH] cgroup/cpuset: remove unneeded nodes_or() in cpuset_change_task_nodemask()
Date: Sat, 17 Jun 2023 16:30:43 +0800 [thread overview]
Message-ID: <20230617083043.2065556-1-linmiaohe@huawei.com> (raw)
The tsk->mems_allowed is changed before calling mpol_rebind_task() and
being reassigned right after it. But tsk->mems_allowed is not needed
inside mpol_rebind_task(). So remove unneeded tsk->mems_allowed modify
via nodes_or() here.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
kernel/cgroup/cpuset.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 58e6f18f01c1..33a429c1179f 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1941,7 +1941,6 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,
local_irq_disable();
write_seqcount_begin(&tsk->mems_allowed_seq);
- nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
mpol_rebind_task(tsk, newmems);
tsk->mems_allowed = *newmems;
--
2.27.0
next reply other threads:[~2023-06-17 8:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-17 8:30 Miaohe Lin [this message]
2023-06-19 14:37 ` Waiman Long
2023-06-20 4:02 ` Miaohe Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230617083043.2065556-1-linmiaohe@huawei.com \
--to=linmiaohe@huawei.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®