From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] switch rangeset's lock to rwlock Date: Wed, 01 Oct 2014 10:31:12 +0100 Message-ID: <542BC9E0.1020802@gmail.com> References: <5413094B020000780003480E@mail.emea.novell.com> <20140919163202.GA9327@laptop.dumpdata.com> <542A8ADD020000780003AE5E@mail.emea.novell.com> <20140930120149.GA30119@deinos.phlegethon.org> <542B1852.9070904@gmail.com> <542BDE30020000780003B653@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XZGFg-0002M3-Gb for xen-devel@lists.xenproject.org; Wed, 01 Oct 2014 09:31:16 +0000 Received: by mail-wg0-f49.google.com with SMTP id x12so576280wgg.8 for ; Wed, 01 Oct 2014 02:31:15 -0700 (PDT) In-Reply-To: <542BDE30020000780003B653@mail.emea.novell.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: Jan Beulich Cc: Keir Fraser , Ian Jackson , Tim Deegan , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org Jan Beulich wrote: >>>> On 30.09.14 at 22:53, wrote: >> Do the searches ever get long enough that a read lock helps? If any of >> the rangesets is getting large and making the searches slow then it >> would be quite easy to switch from linked list to red-black tree? > > As noted elsewhere, even very brief locking periods can cause > convoys for many-vCPU guests. One case where we observe > this is hvm_get_guest_time_fixed() (without clear route for > mitigation as converting to rw lock is not an option here, and I > didn't get around to try out whether eliminating the lock > altogether in favor of atomic CPU operations would make this > any better). Given how rarely most of these rangesets get updated, it would be nice to let the guest itself have lock-free access at the expense of having to pause it to make modifications. Although, does a guest ever modify any of its own rangesets? I'm not sure that ever happens. -- Keir > Jan >