]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cgroup/cpuset: Update stale generate_sched_domains() comments
authorJuri Lelli <juri.lelli@redhat.com>
Wed, 19 Dec 2018 13:34:44 +0000 (14:34 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 19 Apr 2019 17:44:14 +0000 (19:44 +0200)
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

index 4834c4214e9cd15f2122b4747b31a66e5b632df9..6a1942ed781c5b1712021299fb8227d389126c00 100644 (file)
@@ -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 */