From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v2] xen/credit scheduler; Use delay to control scheduling frequency Date: Mon, 19 Dec 2011 13:59:33 +0000 Message-ID: References: <4EEF02E20200007800068C60@nat28.tlf.novell.com> <4EEF36A60200007800068D43@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4EEF36A60200007800068D43@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Kevin Tian , "xen-devel@lists.xensource.com" , "keir@xen.org" , Eddie Dong , Hui Lv , Jiangang Duan , Zhidong Yu List-Id: xen-devel@lists.xenproject.org On Mon, Dec 19, 2011 at 12:05 PM, Jan Beulich wrote: >> The way it stands now, the ratelimit value will override the timeslice >> value. =A0It had to be one way or the other; do you think the timeslice >> value should be the priority? > > The minimum of both should be used, I would think. What do you mean? You mean in the assignment above? That won't have any effect other than increasing interrupts and trips through the scheduler. Suppose the following set of events: * timeslice is set to 1ms, ratelimit_us to 5000. * a vcpu V is chosen; it's set to run with 1ms timeout. * 1ms later, we go through the scheduler; the ratelimit code determines that it hasn't run for long enough (only 1ms), so choses it to run again (with a 1ms timeslice) * Repeat until V has run for 5ms. So although the timeslice is set to 1ms, and interrupts are happening after 1ms, the ratelimit is overriding the 1ms of the timeslice and making it 5ms. Fundamentally, one of the two parameters must override the other. With this patch the way it is now, ratelimit will override timeslice. if you want the timeslice to override ratelimit, then there will have to be more code to make that happen. -George