[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 0/2] xen: credit1: fix a race when picking initial pCPU for a vCPU
Hey, This is v2 of this https://lists.xen.org/archives/html/xen-devel/2016-08/msg01679.html although it became a small series, as I noticed in the process room for a small improvement to the code and added a patch for that (that's patch 2). Also, while adding the ASSERT() George asked for here https://lists.xen.org/archives/html/xen-devel/2016-08/msg01694.html , I discovered that things where a bit worse than they looked at the beginning (I described such finding here: https://lists.xen.org/archives/html/xen-devel/2016-08/msg01752.html). Patch 1 of this series is my idea of a fix for the reported issue, that does not explode in any other way and is also respectful of the code of csched_tick(). In fact, while the most obvious) solution would be to just always take the appropriate lock, doing that in csched_tick() is particularly tricky (because of Credit1's lock nesting rule), and would result in a dance of taking and releasing locks which I don't think is what we want. I've tested this by repeatedly creating and destroying a VM, on both an idle and a loaded system, as that seems to be what makes the system crash in both Andrew's XenServer testing, and OSSTest flight 100518 (it's failing at the guest-start/win.repeat step). If people (George, mainly, I guess) agree this is the proper fix, I think this (I mean, patch 1) needs to be backported to all the branches to which we backported 9f358ddd69463 ("xen: Have schedulers revise initial placement"). Regards, Dario --- Dario Faggioli (2): xen: credit1: fix a race when picking initial pCPU for a vCPU xen: credit1: no need to check for is_idle_vcpu() in csched_vcpu_acct() xen/common/sched_credit.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |