[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 0/5] sched: credit2: introduce per-vcpu hard and soft affinity


The credit2 vcpu scheduler currently ignores per-vcpu hard and soft affinity

In the v3 review I was asked by George Dunlap to split up the soft affinity
patch into multiple patches by function and only resend the changes to two of
them, get_fallback_cpu and runq_tickle, so this series does not include any
soft affinity changes to credit2 functions balance_load or choose_cpu.  

The first patch is new to the series. It just moves macro VCPU2ONLINE from 
schedule.c to sched.h so other schedulers can use it.

The second patch updates the scheduler to ensure that vcpus only run
on pcpus on which they are allowed to run (hard affinity). I tested it using
xl vcpu-pin and xl vcpu-list. I changed the affinity in different ways using
scripted calls to vcpu-pin and observed the results using vcpu-list. Each VCPU
ran where it was supposed to.

Patch three factors out code from the credit scheduler (sched_credit.c) related
to soft affinity load balancing and places it in a common header (sched-if.h).
This allows credit2 to reuse the functions and defines in the soft affinity
patches. The only change here from v3 is an update to the commit message
adding that no functional changes are intended with the patch. I carried over
the reviewed-by line from Dario Faggioli.

In the v3 series there was a patch that only included indents in credit2
function runq_tickle in order to make the soft affinity patch easier to review.
Based on the review that patch has been dropped and the indents are included in
the separate credit2 soft affinity runq_tickle patch.

The fourth and fifth patches add per-vcpu soft affinity awareness to functions
get_fallback_cpu and runq_tickle, respectively. 

Look forward to the review comments, thanks!

Justin Weaver

[1/5] sched: factor out VCPU2ONLINE to common header file
[2/5] sched: credit2: respect per-vcpu hard affinity
[3/5] sched: factor out per-vcpu affinity related code to common header file
[4/5] sched: credit2: add soft affinity awareness to function get_fallback_cpu
[5/5] sched: credit2: add soft affinity awareness to function runq_tickle

xen/common/sched_credit.c  |   87 ++------------
xen/common/sched_credit2.c |  268 +++++++++++++++++++++++++++++++++-----------
xen/common/schedule.c      |    1 -
xen/include/xen/sched-if.h |   65 +++++++++++
xen/include/xen/sched.h    |    2 +
5 files changed, 282 insertions(+), 141 deletions(-)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.