xen: sched-null: support soft-affinity
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 26 Jul 2017 14:55:28 +0000 (15:55 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 26 Jul 2017 14:55:28 +0000 (15:55 +0100)
commit4ba2bf255299f5b2658ee9784e1157a6fdeb8d64
treebdd8704e4dd20fb725e410a766ab487cb8c5cf9d
parent1061335473fd2199218160920f9bef2609e36b92
xen: sched-null: support soft-affinity

The null scheduler does not really use hard-affinity for
scheduling, it uses it for 'placement', i.e., for deciding
to what pCPU to statically assign a vCPU.

Let's use soft-affinity in the same way, of course with the
difference that, if there's no free pCPU within the vCPU's
soft-affinity, we go checking the hard-affinity, instead of
putting the vCPU in the waitqueue.

This does has no impact on the scheduling overhead, because
soft-affinity is only considered in cold-path (like when a
vCPU joins the scheduler for the first time, or is manually
moved between pCPUs by the user).

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/common/sched_null.c