|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-changelog
[Xen-changelog] [xen-unstable] _csched_cpu_pick(): simplify	sched_smt_po 
| # HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1300123211 0
# Node ID 9f6dec0d25cdef647b60286b99e8beb39b4d91cd
# Parent  77bb4be5c95430ee3bad473f1c791affaa517034
_csched_cpu_pick(): simplify sched_smt_power_savings dependent condition
At least to me, using ?: instead of the (a && ...) || (!a && ...)
construct is far easier to grok with a single look.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
diff -r 77bb4be5c954 -r 9f6dec0d25cd xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Mon Mar 14 17:19:47 2011 +0000
+++ b/xen/common/sched_credit.c Mon Mar 14 17:20:11 2011 +0000
@@ -526,10 +526,9 @@
         weight_cpu = cpus_weight(cpu_idlers);
         weight_nxt = cpus_weight(nxt_idlers);
         /* smt_power_savings: consolidate work rather than spreading it */
-        if ( ( sched_smt_power_savings
-               && (weight_cpu > weight_nxt) )
-             || ( !sched_smt_power_savings
-                  && (weight_cpu * migrate_factor < weight_nxt) ) )
+        if ( sched_smt_power_savings ?
+             weight_cpu > weight_nxt :
+             weight_cpu * migrate_factor < weight_nxt )
         {
             cpus_and(nxt_idlers, cpus, nxt_idlers);
             spc = CSCHED_PCPU(nxt);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
[Xen-changelog] [xen-unstable] _csched_cpu_pick(): simplify	sched_smt_power_savings dependent condition,
Xen patchbot-unstable <=
 |  |  | 
  
    |  |  |