Linux cgroups development
 help / color / mirror / Atom feed
* [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
  2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo
  0 siblings, 2 replies; 3+ 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] 3+ 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
  2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo
  1 sibling, 0 replies; 3+ 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] 3+ 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
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2018-12-19 19:36 UTC | newest]

Thread overview: 3+ 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
2018-12-19 19:36 ` [PATCH 1/2] cgroup/cpuset: Update stale generate_sched_domains() comments Tejun Heo

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