From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v4 0/3] qspinlock: Introducing a 4-byte queue spinlock Date: Thu, 20 Feb 2014 09:44:11 -0800 Message-ID: References: <1392669684-4807-1-git-send-email-Waiman.Long@hp.com> <53029167.4060109@zytor.com> <20140218073111.GW27965@twins.programming.kicks-ass.net> <5303B4C4.2040907@hp.com> <20140218212827.GR14089@laptop.programming.kicks-ass.net> <5303FDEC.9060001@hp.com> <20140219085107.GG27965@twins.programming.kicks-ass.net> <53050501.3070101@hp.com> <20140219194832.GY14089@laptop.programming.kicks-ass.net> <53063D4A.9010601@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-ve0-f177.google.com ([209.85.128.177]:64597 "EHLO mail-ve0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbaBTRoM (ORCPT ); Thu, 20 Feb 2014 12:44:12 -0500 In-Reply-To: <53063D4A.9010601@hp.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Waiman Long Cc: Peter Zijlstra , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "linux-arch@vger.kernel.org" , the arch/x86 maintainers , Linux Kernel Mailing List , Steven Rostedt , Andrew Morton , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Raghavendra K T , George Spelvin , Tim Chen , Daniel J Blueman , Alexander Fyodorov , Aswin Chandramouleeswaran , Scott J Norton , Thavatchai On Thu, Feb 20, 2014 at 9:37 AM, Waiman Long wrote: > > Yes, that is true for paravirt, but I was talking about virtualization in > general. For non-paravirtualized environments, we should basically optimize for the actual hardware, and assume that the full virtualization is good enough that we don't care. Obviously, sometimes we might take "this is particularly expensive to virtualize" into account, and if it doesn't hurt hardware, try to help the virtual environment along. So you might have cases where certain hardware (typically interrupt controllers etc) should be accessed certain particular ways, because those not only work on real hardware, but behave well in virtualized environments too. But for spinlocks, just make the raw hardware work well when not *actively* paravirtualized. If some hypervisor deals badly with it, it's a hypervisor or management problem. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f177.google.com ([209.85.128.177]:64597 "EHLO mail-ve0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbaBTRoM (ORCPT ); Thu, 20 Feb 2014 12:44:12 -0500 MIME-Version: 1.0 In-Reply-To: <53063D4A.9010601@hp.com> References: <1392669684-4807-1-git-send-email-Waiman.Long@hp.com> <53029167.4060109@zytor.com> <20140218073111.GW27965@twins.programming.kicks-ass.net> <5303B4C4.2040907@hp.com> <20140218212827.GR14089@laptop.programming.kicks-ass.net> <5303FDEC.9060001@hp.com> <20140219085107.GG27965@twins.programming.kicks-ass.net> <53050501.3070101@hp.com> <20140219194832.GY14089@laptop.programming.kicks-ass.net> <53063D4A.9010601@hp.com> Date: Thu, 20 Feb 2014 09:44:11 -0800 Message-ID: Subject: Re: [PATCH v4 0/3] qspinlock: Introducing a 4-byte queue spinlock From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-arch-owner@vger.kernel.org List-ID: To: Waiman Long Cc: Peter Zijlstra , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "linux-arch@vger.kernel.org" , the arch/x86 maintainers , Linux Kernel Mailing List , Steven Rostedt , Andrew Morton , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Raghavendra K T , George Spelvin , Tim Chen , Daniel J Blueman , Alexander Fyodorov , Aswin Chandramouleeswaran , Scott J Norton , Thavatchai Makphaibulchoke Message-ID: <20140220174411.RWnc_H4mbsaIyJZrWAAA1qyHTVGclgV6PeP4I4dc44w@z> On Thu, Feb 20, 2014 at 9:37 AM, Waiman Long wrote: > > Yes, that is true for paravirt, but I was talking about virtualization in > general. For non-paravirtualized environments, we should basically optimize for the actual hardware, and assume that the full virtualization is good enough that we don't care. Obviously, sometimes we might take "this is particularly expensive to virtualize" into account, and if it doesn't hurt hardware, try to help the virtual environment along. So you might have cases where certain hardware (typically interrupt controllers etc) should be accessed certain particular ways, because those not only work on real hardware, but behave well in virtualized environments too. But for spinlocks, just make the raw hardware work well when not *actively* paravirtualized. If some hypervisor deals badly with it, it's a hypervisor or management problem. Linus