From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv3 0/4] Use ticket locks for spinlocks Date: Thu, 30 Apr 2015 16:44:01 +0100 Message-ID: <55424DC1.80105@citrix.com> References: <1429611088-23950-1-git-send-email-david.vrabel@citrix.com> <55364119020000780007434E@mail.emea.novell.com> <5538E8C6.9050207@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YnqdZ-0003cH-Ki for xen-devel@lists.xenproject.org; Thu, 30 Apr 2015 15:44:29 +0000 In-Reply-To: <5538E8C6.9050207@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel , Jan Beulich , Jennifer Herbert Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Tim Deegan , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 23/04/15 13:42, David Vrabel wrote: > On 21/04/15 11:22, Jan Beulich wrote: >>>>> On 21.04.15 at 12:11, wrote: >>> We have analysed the affect of this series on interrupt latency (by >>> measuring the duration of irq disable/enable regions) and there is no >>> signficant impact. >>> >>> http://xenbits.xen.org/people/dvrabel/bar2_comp.png >> >> Thanks for doing this! >> >>> Interestingly, the biggest offenders for long critical sections are >>> bare irq disable/enable regions, and some of these are really bad (10s >>> of ms)! >>> >>> http://xenbits.xen.org/people/dvrabel/bar_normal_busy.png >> >> Despite both pictures saying micro-seconds at the respective >> axis (and hence the problem not being _as bad_) > > This particular graph doesn't show it very well but there are small > blips around 4, 10, and 31 ms. This first set of analysis incorrect included some bogus data. 1. The mwait idle driver has interrupts masked for the mwait instruction (with the wake-on-interrupt bit enabled), thus the very long times were measuring idle time. 2. do_IRQ() calls spin_unlock_irq() without a corresponding spin_lock_irq() thus the values for this lock were incorrect. Here's an updated graph (Thanks to Jennifer). http://xenbits.xen.org/people/dvrabel/ticket-locks/busy_byte.png The durations are all more reasonable now. David