From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v8 for-xen-4.5 2/2] dpci: Replace tasklet with an softirq (v8) Date: Mon, 27 Oct 2014 11:09:10 +0000 Message-ID: <544E27D6.1040305@citrix.com> References: <1413911967-26886-1-git-send-email-konrad.wilk@oracle.com> <1413911967-26886-3-git-send-email-konrad.wilk@oracle.com> <5448E82702000078000415B5@mail.emea.novell.com> <20141024015858.GB28850@laptop.dumpdata.com> <544A41970200007800041D63@mail.emea.novell.com> <20141024205544.GA19814@laptop.dumpdata.com> <544E1F590200007800042517@mail.emea.novell.com> <544E2105.1000907@citrix.com> <544E33B902000078000425F0@mail.emea.novell.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 1XiiAq-0006L3-A7 for xen-devel@lists.xenproject.org; Mon, 27 Oct 2014 11:09:20 +0000 In-Reply-To: <544E33B902000078000425F0@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 , Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org On 27/10/14 10:59, Jan Beulich wrote: >>>> On 27.10.14 at 11:40, wrote: >> The domctl lock is a hot lock, and looping with it held like this will >> further starve other toolstack operations. > The domctl lock normally shouldn't be a hot one. It only is if some tool > stack component permanently issues domctl-s to obtain information on > the state of the system. I think it wasn't so long ago that I said I > consider this bad behavior of the tool stack... Or there is a multi-threaded toolstack which is genuinely performing legitimate toolstack operations on multiple domains. This behaviour is very easy to encounter with cloud workloads and automatic load balancers. This is not to say that Xapi could be less silly with some of the operations it issues, but the global domctl lock is fundamentally a bottleneck to parallel domain operations. > >> What is the likelihood that this loop will actually be used? I am >> guessing fairly rare, although it looks more likely to happen for an >> interrupt which is firing frequently? > I think it doesn't so much matter whether the loop will be used > than how long it could end up spinning if used. And that shouldn't > be long, considering that it only waits for interrupt handling to get > finished. Yes. I don't disagree that this is probably the best way of handling the situation, but it isn't 0-cost either. Can it ever be the case that we are waiting for a remote pcpu to run its softirq handler? If so, the time spent looping here could be up to 1 scheduling timeslice in the worst case, and 30ms is a very long time to wait. ~Andrew