[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] sched: credit2: respect per-vcpu hard affinity
On Mon, Feb 2, 2015 at 4:24 AM, Dario Faggioli <dario.faggioli@xxxxxxxxxx> wrote: > On Sat, 2015-01-31 at 20:51 -1000, Justin Weaver wrote: >> On Mon, Jan 19, 2015 at 9:21 PM, Justin Weaver <jtweaver@xxxxxxxxxx> wrote: >> > On Mon, Jan 12, 2015 at 8:05 AM, Dario Faggioli > >> For example... >> I start a guest with one vcpu with hard affinity 8 - 15 and xl >> vcpu-list says it's running on pcpu 15 >> I run xl vcpu-pin 1 0 8 to change it to hard affinity only with pcpu 8 >> When it gets to vcpu_wake, it tests vcpu_runnable(v) which is false >> because _VPF_blocked is set, so it skips the call to >> SCHED_OP(VCPU2OP(v), wake, v); and so does not get a runq_tickle >> xl vcpu-list now shows --- for the state and I cannot console into it >> What I don't understand though is if I then enter xl vcpu-pin 1 0 15 >> it reports that _VPF_blocked is NOT set, vcpu_wake calls credit2's >> wake, it gets a runq_tickle and everything is fine again >> Why did the value of the _VPF_blocked flag change after I entered xl >> vcpu-pin the second time?? I dove deep in the code and could not >> figure it out. >> > As promised, I am having a look. As I recalled, affinity > setting/changing should not involve fiddling with _VPF_blocked, so there > should be something else going on. > > This seems to me to be confirmed by the fact that you can make the > system working again via another call to 'vcpu-pin'. > > I'm playing a little bit with your code, with and without the call to > migrate(), to try and see better what's happening. If you happen to have > an updated version of it, even if still work-in progress, and not ready > for being the actual v2, and you want to share it, so that I can try > that one, please go ahead (just attach it to your reply, it's for > debugging, so no necessary for it to be a proper submission). Dario, Please see attached draft v2 1/2 patch. Changes since v1: * Added dynamically allocated cpumasks to avoid putting them on the stack * Added helper function for code suggested in v1 review and called in two locations in function choose_cpu * Replaced two instances of cpumask_and/cpumask_empty with cpumask_intersects * Removed coding style fix in function balance_load * Improved comment in function runq_candidate Debugging changes: * During an affinity change, migrate only gets called when the current and destination run queues are different * The changes to schedule.c and domctl.c are only for debugging (printk calls that only trigger during an affinity change) Thank you, Justin Attachment:
sched-credit2-v2_1of2_draft.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |