lkml.org 
[lkml]   [2015]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [4.2, Regression] Queued spinlocks cause major XFS performance regression
From
On Fri, Sep 4, 2015 at 8:30 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>> 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.
>
> Fair enough; I had not considered the slim hypervisor case.
>
> Should I place the virt_spin_lock() thing under CONFIG_PARAVIRT (maybe
> even _SPINLOCKS) such that only paravirt enabled kernels when ran on a
> hypervisor that does not support paravirt patching (HyperV, VMware,
> etc..) revert to the test-and-set?

My gut feel would be to try to match out old paravirt setup, which
similarly replaced the ticket locks with the test-and-set lock, and
try to match the situation where that happened?

Looking at 4.1, back then we very statically just based on
CONFIG_PARAVIRT_SPINLOCKS switched between the ticket lock behavior
and the test-and-set lock. I think we should aim for matching that for
now.

Which is not to say that we can't tune this if somebody comes up with
a better model. For example, the "test hypervisor bit" thing might
still be a good idea: even *if* you have CONFIG_PARAVIRT_SPINLOCKS,
maybe we can do the queued locks if we don't seem to be running under
a hypervisor? Our old model was entirely static, the new queued
spinlock slowpath could clearly be a *bit* more dynamic.

But as a first rough draft, I think "replace ticket locks with queued
locks, leave test-and-set lock condition the way it was" is the way to
go. Particularly since clearly the virtualized behavior had not gotten
enough testing..

Linus


\
 
 \ /
  Last update: 2015-09-04 18:21    [W:0.054 / U:21.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site