From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 2/2] locking/mutex,rwsem: Reduce vcpu_is_preempted() calling frequency Date: Wed, 8 Feb 2017 20:05:33 +0100 Message-ID: <20170208190533.GB6515@twins.programming.kicks-ass.net> References: <1486576825-17058-1-git-send-email-longman@redhat.com> <1486576825-17058-2-git-send-email-longman@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-arch@vger.kernel.org, Juergen Gross , Jeremy Fitzhardinge , x86@kernel.org, kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Boris Ostrovsky , Pan Xinhui , Paolo Bonzini , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Chris Wright , Ingo Molnar , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Alok Kataria , Thomas Gleixner To: Waiman Long Return-path: Content-Disposition: inline In-Reply-To: <1486576825-17058-2-git-send-email-longman@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: kvm.vger.kernel.org On Wed, Feb 08, 2017 at 01:00:25PM -0500, Waiman Long wrote: > As the vcpu_is_preempted() call is pretty costly compared with other > checks within mutex_spin_on_owner() and rwsem_spin_on_owner(), they > are done at a reduce frequency of once every 256 iterations. That's just disgusting.