Subject: Bypass "find_busiest_queue" in VSMP (SMVP) mode

From: Suprasad Mutalik Desai <[email-masked]>
Date: Fri, 6 Jul 2012 15:56:20 +0530

Hi All,

Currently i am running SMVP mode (2 VPEs each having one TC) on MIPS 34Kc
.

W.r.t load balancing logic,
load_balance --> find_busiest_group (find the busiest group in the domain)
--> find_busiest_queue (find the busiest runqueue among the cpus in group)

In SMVP mode, each VPE is referred as groups and these VPEs (groups) have
*ONLY* one TC (CPU) so do we still need to run "find_busiest_queue" to get
the busiest runqueue among the cpus of a particular group .

Instead of "find_busiest_queue" , can we use below code in
"linux-2.6.32.42/kernel/sched.c" ,

+#ifdef CONFIG_MIPS_MT_SMP
+       cpu = cpumask_first(sched_group_cpus(group))  / * get the first CPU
in the busiest group */
+       busiest = cpu_rq (cpu)                        /* assign the
runqueue of the cpu to busiest */
+#else
        busiest = find_busiest_queue(group, idle, imbalance, cpus);
+#endif

Please let me know your views .

Thanks and Regards,
Suprasad.