* [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments
@ 2018-12-19 13:34 Juri Lelli
2018-12-19 13:34 ` [PATCH 2/2] sched/topology: Update init_sched_domains() comment Juri Lelli
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Juri Lelli @ 2018-12-19 13:34 UTC (permalink / raw)
To: lizefan, mingo, peterz, tj; +Cc: linux-kernel, cgroups, Juri Lelli
Commit fc560a26acce ("cpuset: replace cpuset->stack_list with
cpuset_for_each_descendant_pre()") removed the local list (q)
that was used to perform a top-down scan of all cpusets;
however, comments mentioning it were not updated.
Update comments to reflect current implementation.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
---
kernel/cgroup/cpuset.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index f0decd8165e7..f0822a730879 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -725,11 +725,10 @@ static inline int nr_cpusets(void)
* Must be called with cpuset_mutex held.
*
* The three key local variables below are:
- * q - a linked-list queue of cpuset pointers, used to implement a
- * top-down scan of all cpusets. This scan loads a pointer
- * to each cpuset marked is_sched_load_balance into the
- * array 'csa'. For our purposes, rebuilding the schedulers
- * sched domains, we can ignore !is_sched_load_balance cpusets.
+ * cp - cpuset pointer, used (together with pos_css) to perform a
+ * top-down scan of all cpusets. For our purposes, rebuilding
+ * the schedulers sched domains, we can ignore !is_sched_load_
+ * balance cpusets.
* csa - (for CpuSet Array) Array of pointers to all the cpusets
* that need to be load balanced, for convenient iterative
* access by the subsequent code that finds the best partition,
@@ -760,7 +759,7 @@ static inline int nr_cpusets(void)
static int generate_sched_domains(cpumask_var_t **domains,
struct sched_domain_attr **attributes)
{
- struct cpuset *cp; /* scans q */
+ struct cpuset *cp; /* top-down scan of cpusets */
struct cpuset **csa; /* array of all cpuset ptrs */
int csn; /* how many cpuset ptrs in csa so far */
int i, j, k; /* indices for partition finding loops */
--
2.17.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] sched/topology: Update init_sched_domains() comment
2018-12-19 13:34 [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Juri Lelli
@ 2018-12-19 13:34 ` Juri Lelli
2019-04-19 18:44 ` [tip:sched/core] " tip-bot for Juri Lelli
2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo
2019-04-19 18:43 ` [tip:sched/core] " tip-bot for Juri Lelli
2 siblings, 1 reply; 5+ messages in thread
From: Juri Lelli @ 2018-12-19 13:34 UTC (permalink / raw)
To: lizefan, mingo, peterz, tj; +Cc: linux-kernel, cgroups, Juri Lelli
Holding hotplug lock is not a requirement anymore for callers of sched_
init_domains after commit 6acce3ef8452 ("sched: Remove get_online_cpus()
usage").
Update the relative comment preceding init_sched_domains().
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
---
kernel/sched/topology.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 8d7f15ba5916..10e61b62f138 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1850,9 +1850,8 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms)
}
/*
- * Set up scheduler domains and groups. Callers must hold the hotplug lock.
- * For now this just excludes isolated CPUs, but could be used to
- * exclude other special cases in the future.
+ * Set up scheduler domains and groups. For now this just excludes isolated
+ * CPUs, but could be used to exclude other special cases in the future.
*/
int sched_init_domains(const struct cpumask *cpu_map)
{
--
2.17.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments
2018-12-19 13:34 [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Juri Lelli
2018-12-19 13:34 ` [PATCH 2/2] sched/topology: Update init_sched_domains() comment Juri Lelli
@ 2018-12-19 19:36 ` Tejun Heo
2019-04-19 18:43 ` [tip:sched/core] " tip-bot for Juri Lelli
2 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2018-12-19 19:36 UTC (permalink / raw)
To: Juri Lelli; +Cc: lizefan, mingo, peterz, linux-kernel, cgroups
On Wed, Dec 19, 2018 at 02:34:44PM +0100, Juri Lelli wrote:
> Commit fc560a26acce ("cpuset: replace cpuset->stack_list with
> cpuset_for_each_descendant_pre()") removed the local list (q)
> that was used to perform a top-down scan of all cpusets;
> however, comments mentioning it were not updated.
>
> Update comments to reflect current implementation.
>
> Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Prolly better to route through scheduler tree together with the second
patch?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:sched/core] cgroup/cpuset: Update stale generate_sched_domains() comments
2018-12-19 13:34 [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Juri Lelli
2018-12-19 13:34 ` [PATCH 2/2] sched/topology: Update init_sched_domains() comment Juri Lelli
2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo
@ 2019-04-19 18:43 ` tip-bot for Juri Lelli
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Juri Lelli @ 2019-04-19 18:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: juri.lelli, torvalds, tj, hpa, linux-kernel, peterz, mingo, tglx
Commit-ID: b6fbbf31d15b5072250ec6ed79e415a1160e5621
Gitweb: https://git.kernel.org/tip/b6fbbf31d15b5072250ec6ed79e415a1160e5621
Author: Juri Lelli <juri.lelli@redhat.com>
AuthorDate: Wed, 19 Dec 2018 14:34:44 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 19 Apr 2019 19:44:14 +0200
cgroup/cpuset: Update stale generate_sched_domains() comments
Commit:
fc560a26acce ("cpuset: replace cpuset->stack_list with cpuset_for_each_descendant_pre()")
removed the local list (q) that was used to perform a top-down scan
of all cpusets; however, comments mentioning it were not updated.
Update comments to reflect current implementation.
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: cgroups@vger.kernel.org
Cc: lizefan@huawei.com
Link: http://lkml.kernel.org/r/20181219133445.31982-1-juri.lelli@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/cgroup/cpuset.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 4834c4214e9c..6a1942ed781c 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -740,11 +740,10 @@ static inline int nr_cpusets(void)
* Must be called with cpuset_mutex held.
*
* The three key local variables below are:
- * q - a linked-list queue of cpuset pointers, used to implement a
- * top-down scan of all cpusets. This scan loads a pointer
- * to each cpuset marked is_sched_load_balance into the
- * array 'csa'. For our purposes, rebuilding the schedulers
- * sched domains, we can ignore !is_sched_load_balance cpusets.
+ * cp - cpuset pointer, used (together with pos_css) to perform a
+ * top-down scan of all cpusets. For our purposes, rebuilding
+ * the schedulers sched domains, we can ignore !is_sched_load_
+ * balance cpusets.
* csa - (for CpuSet Array) Array of pointers to all the cpusets
* that need to be load balanced, for convenient iterative
* access by the subsequent code that finds the best partition,
@@ -775,7 +774,7 @@ static inline int nr_cpusets(void)
static int generate_sched_domains(cpumask_var_t **domains,
struct sched_domain_attr **attributes)
{
- struct cpuset *cp; /* scans q */
+ struct cpuset *cp; /* top-down scan of cpusets */
struct cpuset **csa; /* array of all cpuset ptrs */
int csn; /* how many cpuset ptrs in csa so far */
int i, j, k; /* indices for partition finding loops */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:sched/core] sched/topology: Update init_sched_domains() comment
2018-12-19 13:34 ` [PATCH 2/2] sched/topology: Update init_sched_domains() comment Juri Lelli
@ 2019-04-19 18:44 ` tip-bot for Juri Lelli
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Juri Lelli @ 2019-04-19 18:44 UTC (permalink / raw)
To: linux-tip-commits
Cc: torvalds, mingo, juri.lelli, tglx, linux-kernel, hpa, tj, peterz
Commit-ID: cb0c04143b6196f4a479ba113706329fc667ee15
Gitweb: https://git.kernel.org/tip/cb0c04143b6196f4a479ba113706329fc667ee15
Author: Juri Lelli <juri.lelli@redhat.com>
AuthorDate: Wed, 19 Dec 2018 14:34:45 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 19 Apr 2019 19:44:15 +0200
sched/topology: Update init_sched_domains() comment
Holding hotplug lock is not a requirement anymore for callers of sched_
init_domains after commit:
6acce3ef8452 ("sched: Remove get_online_cpus() usage")
Update the relative comment preceding init_sched_domains().
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: cgroups@vger.kernel.org
Cc: lizefan@huawei.com
Link: http://lkml.kernel.org/r/20181219133445.31982-2-juri.lelli@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/topology.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index c65b31e9458b..f53f89df837d 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -2081,9 +2081,8 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms)
}
/*
- * Set up scheduler domains and groups. Callers must hold the hotplug lock.
- * For now this just excludes isolated CPUs, but could be used to
- * exclude other special cases in the future.
+ * Set up scheduler domains and groups. For now this just excludes isolated
+ * CPUs, but could be used to exclude other special cases in the future.
*/
int sched_init_domains(const struct cpumask *cpu_map)
{
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-19 18:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 13:34 [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Juri Lelli
2018-12-19 13:34 ` [PATCH 2/2] sched/topology: Update init_sched_domains() comment Juri Lelli
2019-04-19 18:44 ` [tip:sched/core] " tip-bot for Juri Lelli
2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo
2019-04-19 18:43 ` [tip:sched/core] " tip-bot for Juri Lelli
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).