lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 28 Aug 2009 17:17:00 -0700
From:	"Anirban Sinha" <ASinha@...gmasystems.com>
To:	<linux-kernel@...r.kernel.org>, "Ingo Molnar" <mingo@...e.hu>
Subject: [PATCH] rename per CPU init_cfs_rq to init_tg_cfs_rq

Hi Folks:

I am going through the task scheduling code and something looks strange.
A per cpu variable shares the same name with a function. This is
potentially confusing. Not sure if you guys have noticed it but here's
another cleanup patch to address the issue.

Cheers,

Ani


Signed-off-by: Anirban Sinha <asinha@...gmasystems.com>

kernel/sched.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 1b59e26..e1e97b3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -318,7 +318,7 @@ struct task_group root_task_group;
 /* Default task group's sched entity on each cpu */
 static DEFINE_PER_CPU(struct sched_entity, init_sched_entity);
 /* Default task group's cfs_rq on each cpu */
-static DEFINE_PER_CPU(struct cfs_rq, init_cfs_rq)
____cacheline_aligned_in_smp;
+static DEFINE_PER_CPU(struct cfs_rq, init_tg_cfs_rq)
____cacheline_aligned_in_smp;
 #endif /* CONFIG_FAIR_GROUP_SCHED */

 #ifdef CONFIG_RT_GROUP_SCHED
@@ -9304,11 +9304,11 @@ void __init sched_init(void)
                 * system cpu resource, based on the weight assigned to
root
                 * user's cpu share (INIT_TASK_GROUP_LOAD). This is
accomplished
                 * by letting tasks of init_task_group sit in a separate
cfs_rq
-                * (init_cfs_rq) and having one entity represent this
group of
+                * (init_tg_cfs_rq) and having one entity represent this
group of
                 * tasks in rq->cfs (i.e init_task_group->se[] != NULL).
                 */
                init_tg_cfs_entry(&init_task_group,
-                               &per_cpu(init_cfs_rq, i),
+                               &per_cpu(init_tg_cfs_rq, i),
                                &per_cpu(init_sched_entity, i), i, 1,
                                root_task_group.se[i]);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ