[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for 4.7] xen: sched: avoid races on time values read from NOW()
Hey Wei, Again, I'm using an otherwise unnecessary cover letter for my analysis about <<should we include this in 4.7 or not?>>. :-) I'd say yes, because the patch fixes an actual bug, in the form of a rather subtle race condition, which was all but trivial to spot. I must say, though, that I've only found the bug guilty of being particularly nasty if we use Credit2. Actually, I'm quite sure it has an effect on RTDS too (although I did not trace that), but since both Credit2 and RTDS are still marked as experimental in 4.7, one may think it's not worthwhile putting in something like this to fix experimental only code. Just FYI, this bug is what was causing the issue I briefly chatted about on IRC with George, yesterday, i.e., it is what led Credit2 to emit (rather aggresively, actually) the debug printks showed here: http://pastebin.com/gzYrNST5 Well, TBF, Credit1 will certainly benefit from the fix as well, but Credit1 relies less than the other two schedulers on time and timestamps (and there isn't sampling-vs-locking inversion in its own code after all), so the impact is much smaller. The fix itself is certainly self contained, as it only touches scheduling, and the whay in which it alters generic scheduler code, is indeed straightforward, and hence low risk. So, given all this, my opinion is that we should consider it for 4.7. In any case (I mean, 4.7 or not), after it will hit staging, it should be backported. Thanks and Regards, Dario --- Dario Faggioli (1): xen: sched: avoid races on time values read from NOW() xen/common/sched_credit2.c | 4 ++-- xen/common/sched_rt.c | 7 +++++-- xen/common/schedule.c | 4 +++- 3 files changed, 10 insertions(+), 5 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 http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |