Messages in this thread | | | Date | Fri, 4 Sep 2015 08:21:28 -0700 | Subject | Re: [4.2, Regression] Queued spinlocks cause major XFS performance regression | From | Linus Torvalds <> |
| |
On Fri, Sep 4, 2015 at 8:14 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > The reason we chose to revert to a test-and-set is because regular fair > locks, like the ticket and the queue thing, have horrible behaviour > under vcpu preemption.
Right. However, with our old ticket locks, that's what we got when you didn't ask for paravirt support. No?
So this seems to be a misfeature - you made the hypervisor "support" unconditional. Even a kernel compiled for raw hardware now does that "let's act differently under a hypervisor", which I think is quite debatable to begin with, but when that "act differently" is then complete garbage, it's a disaster.
And even ignoring the "implementation was crap" issue, some people may well want their kernels to be "bare hardware" kernels even under a hypervisor. It may be a slim hypervisor that gives you all the cpus, or it may just be a system that is just sufficiently overprovisioned, so you don't get vcpu preemption in practice.
But it would be interesting to hear if just fixing the busy-looping to not pound the lock with a constant stream of cmpxchg's is already sufficient to fix the big picture problem.
Linus
| |