|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] credit1: replace cpumask_empty() uses
commit b845268509f30a4f4e8e5ca9e7d323f468d21044
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Aug 23 15:06:21 2013 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Aug 23 15:06:21 2013 +0200
credit1: replace cpumask_empty() uses
In one case it was redundant with the operation it got combined with,
and in the other it could easily be replaced by range checking the
result of a subsequent operation. (When running on big systems,
operations on CPU masks aren't cheap enough to use them carelessly.)
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
xen/common/sched_credit.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index 3188310..0b81662 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -641,7 +641,7 @@ _csched_cpu_pick(const struct scheduler *ops, struct vcpu
*vc, bool_t commit)
cpu = cpumask_test_cpu(vc->processor, &cpus)
? vc->processor
: cpumask_cycle(vc->processor, &cpus);
- ASSERT( !cpumask_empty(&cpus) && cpumask_test_cpu(cpu, &cpus) );
+ ASSERT(cpumask_test_cpu(cpu, &cpus));
/*
* Try to find an idle processor within the above constraints.
@@ -1520,10 +1520,9 @@ csched_load_balance(struct csched_private *prv, int cpu,
cpumask_and(&workers, &workers, &node_to_cpumask(peer_node));
cpumask_clear_cpu(cpu, &workers);
- if ( cpumask_empty(&workers) )
- goto next_node;
-
peer_cpu = cpumask_first(&workers);
+ if ( peer_cpu >= nr_cpu_ids )
+ goto next_node;
do
{
/*
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |