|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] About vcpu wakeup and runq tickling in credit
On 23/10/12 14:34, Dario Faggioli wrote: It looks right to me. If yes, here's my question. Is that right to always tickle v_W's affine CPUs and only them? I'm asking because a possible scenario, at least according to me, is that P schedules very quickly after this and, as prio(v_W)>prio(v_C), it selects v_W and leaves v_C in its runq. At that point, one of the tickled CPU (say P') enters schedule, sees that P is not idle, and tries to steal a vcpu from its runq. Now we know that P' has affinity with v_W, but v_W is not there, while v_C is, and if P' is not in its affinity, we've forced P' to reschedule for nothing. Also, there now might be another (or even a number of) CPU where v_C could run that stays idle, as it has not being tickled. Yes -- the two clauses look a bit like they were conceived independently, and maybe no one thought about how they might interact. So, if that is true, it seems we leave some room for sub-optimal CPU utilization, as well as some non-work conserving windows. Of course, it is very hard to tell how frequent this actually happens. As it comes to possible solution, I think that, for instance, tickling all the CPUs in both v_W's and v_C's affinity masks could solve this, but that would also potentially increase the overhead (by asking _a_lot_ of CPUs to reschedule), and again, it's hard to say if/when it's worth... Well in my code, opt_tickle_idle_one is on by default, which means only one other cpu will be woken up. If there were an easy way to make it wake up a CPU in v_C's affinity as well (supposing that there was no overlap), that would probably be a win. Of course, that's only necessary if: * v_C is lower priority than v_W * There are no idlers that intersect both v_C and v_W's affinity mask.It's probably a good idea though to try to set up a scenario where this might be an issue and see how often it actually happens. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |