[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/4] xen: sched: simplify (and speedup) checking soft-affinity
On 09/15/2017 06:35 PM, Dario Faggioli wrote: > The fact of whether or not a vCPU has a soft-affinity > which is effective, i.e., with the power of actually > affecting the scheduling of the vCPU itself rarely > changes. Very, very rarely, as compared to how often > we need to check for the same thing (basically, at > every scheduling decision!). > > That can be improved by storing in a (per-vCPU) flag > (it's actually a boolean field in struct vcpu) whether > or not, considering how hard-affinity and soft-affinity > look like, soft-affinity should or not be taken into > account during scheduling decisions. > > This saves some cpumask manipulations, which is nice, > considering how frequently they were being done. Note > that we can't get rid of 100% of the cpumask operations > involved in the check, because soft-affinity being > effective or not, not only depends on the relationship > between the hard and soft-affinity masks of a vCPU, but > also of the online pCPUs and/or of what pCPUs are part > of the cpupool where the vCPU lives, and that's rather > impractical to store in a per-vCPU flag. Still the > overhead is reduced to "just" one cpumask_subset() (and > only if the newly introduced flag is 'true')! > > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |