From: "Jan Beulich" Subject: Re: [PATCHv3 0/4] Use ticket locks for spinlocks Date: Mon, 04 May 2015 08:18:11 +0100 Message-ID: <55473953020000780007622F@mail.emea.novell.com> References: <1429611088-23950-1-git-send-email-david.vrabel@citrix.com> <55364119020000780007434E@mail.emea.novell.com> <5538E8C6.9050207@citrix.com> <55424DC1.80105@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YpAdv-0005gE-2B for xen-devel@lists.xenproject.org; Mon, 04 May 2015 07:18:19 +0000 In-Reply-To: <55424DC1.80105@citrix.com> Content-Disposition: inline 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 , 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 30.04.15 at 17:44, wrote: > 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. Thanks for doing this! I think this makes clear that there's no immediate need for any further investigation then (a couple of microsecond IRQ-disabled sections don't seem to be a problem for other than true real-time uses). Jan