[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171109160029.GD20859@flask>
Date: Thu, 9 Nov 2017 17:00:30 +0100
From: Radim Krcmar <rkrcmar@...hat.com>
To: Wanpeng Li <kernellwp@...il.com>
Cc: Eduardo Valentin <eduval@...zon.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Matt Wilson <msw@...zon.com>, Jonathan Corbet <corbet@....net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
the arch/x86 maintainers <x86@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Waiman Long <longman@...hat.com>, kvm <kvm@...r.kernel.org>,
linux-doc@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Jan H . Schoenherr" <jschoenh@...zon.de>,
Anthony Liguori <aliguori@...zon.com>
Subject: Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when
PV_DEDICATED is set
2017-11-09 20:43+0800, Wanpeng Li:
> 2017-11-07 4:26 GMT+08:00 Eduardo Valentin <eduval@...zon.com>:
> > Currently, the existing qspinlock implementation will fallback to
> > test-and-set if the hypervisor has not set the PV_UNHALT flag.
> >
> > This patch gives the opportunity to guest kernels to select
> > between test-and-set and the regular queueu fair lock implementation
> > based on the PV_DEDICATED KVM feature flag. When the PV_DEDICATED
> > flag is not set, the code will still fall back to test-and-set,
> > but when the PV_DEDICATED flag is set, the code will use
> > the regular queue spinlock implementation.
> >
> > With this patch, when in autoselect mode, the guest will
> > use the default spinlock implementation based on host feature
> > flags as follows:
> >
> > PV_DEDICATED = 1, PV_UNHALT = anything: default is qspinlock
> > PV_DEDICATED = 0, PV_UNHALT = 1: default is pvqspinlock
> > PV_DEDICATED = 0, PV_UNHALT = 0: default is tas
> >
> > Cc: Paolo Bonzini <pbonzini@...hat.com>
> > Cc: "Radim Krčmář" <rkrcmar@...hat.com>
> > Cc: Jonathan Corbet <corbet@....net>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: x86@...nel.org
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Waiman Long <longman@...hat.com>
> > Cc: kvm@...r.kernel.org
> > Cc: linux-doc@...r.kernel.org
> > Cc: linux-kernel@...r.kernel.org
> > Cc: Jan H. Schoenherr <jschoenh@...zon.de>
> > Cc: Anthony Liguori <aliguori@...zon.com>
> > Suggested-by: Matt Wilson <msw@...zon.com>
> > Signed-off-by: Eduardo Valentin <eduval@...zon.com>
> > ---
>
> You should also add a cpuid flag in kvm part.
It is better without that. The flag has no dependency on KVM (kernel
hypervisor) code.
Powered by blists - more mailing lists