From: "tip-bot2 for Marcelo Tosatti" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Frederic Weisbecker <frederic@kernel.org>,
Marcelo Tosatti <mtosatti@redhat.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: sched/core] kthread: Switch to cpu_possible_mask
Date: Tue, 16 Jun 2020 12:21:53 -0000 [thread overview]
Message-ID: <159231011385.16989.15305912016989181408.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200527142909.23372-2-frederic@kernel.org>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 043eb8e1051143a24811e6f35c276e35ae8247b6
Gitweb: https://git.kernel.org/tip/043eb8e1051143a24811e6f35c276e35ae8247b6
Author: Marcelo Tosatti <mtosatti@redhat.com>
AuthorDate: Wed, 27 May 2020 16:29:08 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 15 Jun 2020 14:10:03 +02:00
kthread: Switch to cpu_possible_mask
Next patch will switch unbound kernel threads mask to
housekeeping_cpumask(), a subset of cpu_possible_mask. So in order to
ease bisection, lets first switch kthreads default affinity from
cpu_all_mask to cpu_possible_mask.
It looks safe to do so as cpu_possible_mask seem to be initialized
at setup_arch() time, way before kthreadd is created.
Suggested-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200527142909.23372-2-frederic@kernel.org
---
kernel/kthread.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 8e3d2d7..b86d37c 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -383,7 +383,7 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data),
* The kernel thread should not inherit these properties.
*/
sched_setscheduler_nocheck(task, SCHED_NORMAL, ¶m);
- set_cpus_allowed_ptr(task, cpu_all_mask);
+ set_cpus_allowed_ptr(task, cpu_possible_mask);
}
kfree(create);
return task;
@@ -608,7 +608,7 @@ int kthreadd(void *unused)
/* Setup a clean context for our children to inherit. */
set_task_comm(tsk, "kthreadd");
ignore_signals(tsk);
- set_cpus_allowed_ptr(tsk, cpu_all_mask);
+ set_cpus_allowed_ptr(tsk, cpu_possible_mask);
set_mems_allowed(node_states[N_MEMORY]);
current->flags |= PF_NOFREEZE;
next prev parent reply other threads:[~2020-06-16 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 14:29 [PATCH 0/2] sched/isolation: Isolate unbound kthreads Frederic Weisbecker
2020-05-27 14:29 ` [PATCH 1/2] kthread: Switch to cpu_possible_mask Frederic Weisbecker
2020-06-16 12:21 ` tip-bot2 for Marcelo Tosatti [this message]
2020-05-27 14:29 ` [PATCH 2/2] isolcpus: Affine unbound kernel threads to housekeeping cpus Frederic Weisbecker
2020-06-16 12:21 ` [tip: sched/core] " tip-bot2 for Marcelo Tosatti
2020-06-04 13:16 ` [PATCH 0/2] sched/isolation: Isolate unbound kthreads Peter Zijlstra
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=159231011385.16989.15305912016989181408.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=x86@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®