From: "Jan Beulich" Subject: Re: [PATCH] switch rangeset's lock to rwlock Date: Thu, 18 Sep 2014 14:32:35 +0100 Message-ID: <541AFB130200007800036360@mail.emea.novell.com> References: <5413094B020000780003480E@mail.emea.novell.com> <20140918104316.GD65000@deinos.phlegethon.org> <541AE8FC02000078000362D1@mail.emea.novell.com> <20140918130258.GB81607@deinos.phlegethon.org> 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 1XUbp7-0004eh-4A for xen-devel@lists.xenproject.org; Thu, 18 Sep 2014 13:32:37 +0000 In-Reply-To: <20140918130258.GB81607@deinos.phlegethon.org> 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: Konrad Rzeszutek Wilk , Tim Deegan Cc: Ian Campbell , xen-devel , Keir Fraser , Ian Jackson List-Id: xen-devel@lists.xenproject.org >>> On 18.09.14 at 15:02, wrote: > At 13:15 +0100 on 18 Sep (1411042524), Jan Beulich wrote: >> >>> On 18.09.14 at 12:43, wrote: >> > At 13:55 +0100 on 12 Sep (1410526507), Jan Beulich wrote: >> >> As a general library routine, it should behave as efficiently as >> >> possible, even if at present no significant contention is known here. >> >> >> >> Signed-off-by: Jan Beulich >> >> --- >> >> With the widened use of rangesets I'd like to re-suggest this change >> >> which I had posted already a couple of years back. >> > >> > Is this addressing an actual (measured) problem or just seems like a >> > good idea? If the latter maybe keep it until after 4.5? >> >> The latter. And yes, I have no problem keeping it until after 4.5, >> it's just that the multi-ioreq-server's extended use of rangesets >> (as said elsewhere) would seem to make this a reasonable fit for >> 4.5. > > Well, I think it's a question for the release manager, then. :) Konrad? > I wouldn't be inclined to tinker with them unless we had a measurement > justifying the change. After all, the rangeset operations are not > long-running ones and we'd be adding some overhead. Well, that's a pretty weak argument: The vHPET lock doesn't protect long running operations either, yet its conversion to rwlock did yield a significant improvement. But yes, unless rangesets participate in something that may get used heavily by a guest, changing the lock kind would likely not have a significant effect. Otoh figuring out that lock contention is a problem involves a non- eglectible amount of work, preemption of which seems at least desirable. In fact, in the latest runs with those many-vCPU Windows guests I see signs of contention even on vpt's pl_time_lock (8 out of 64 vCPU-s racing for it). Jan