From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWmmT-00062g-Il for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:43:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWmmQ-0008Oo-SP for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:43:25 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:53987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWmmQ-0008Ok-Lp for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:43:22 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Sep 2015 08:43:22 -0600 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id A64B738C8026 for ; Tue, 1 Sep 2015 10:43:18 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t81EhIZZ44892394 for ; Tue, 1 Sep 2015 14:43:18 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t81EhHqb031190 for ; Tue, 1 Sep 2015 10:43:18 -0400 Message-ID: <55E5B982.2050908@linux.vnet.ibm.com> Date: Tue, 01 Sep 2015 10:43:14 -0400 From: "Jason J. Herne" MIME-Version: 1.0 References: <1435855010-30882-1-git-send-email-jjherne@linux.vnet.ibm.com> <1435855010-30882-2-git-send-email-jjherne@linux.vnet.ibm.com> <55956A2E.4020806@redhat.com> <55A3CEAF.6030504@linux.vnet.ibm.com> <55A3D5D8.7070902@redhat.com> <55A654D6.5000906@linux.vnet.ibm.com> <55A657ED.3070407@redhat.com> <55A7BDF4.4020509@linux.vnet.ibm.com> <55B0BAE6.3040504@redhat.com> <55BBAC8F.6030604@linux.vnet.ibm.com> <55BBAD5D.4090807@redhat.com> <55BBB38A.4060807@linux.vnet.ibm.com> <55BBBA4B.5070806@linux.vnet.ibm.com> <55BC941F.2010906@redhat.com> In-Reply-To: <55BC941F.2010906@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/5] cpu: Provide vcpu throttling interface Reply-To: jjherne@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , afaerber@suse.de, amit.shah@redhat.com, dgilbert@redhat.com, borntraeger@de.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org On 08/01/2015 05:40 AM, Paolo Bonzini wrote: > > > On 31/07/2015 20:11, Jason J. Herne wrote: >>>> >>> >>> Doh! Yep :). This problem is an artifact of moving the timer_mod from >>> cpu_throttle_thread into cpu_throttle_timer_tick. I'll have to go back >>> to the review comments and look at why that was done. >> >> So, we made that change in v3 to eliminate the per cpu timer. With a per >> cpu timer we avoid this problem and we no longer need to worry about >> a throttle_thread_scheduled, and timers stacking. Paolo, you had originally >> argued in favor of this change. With what we know now, do you still think >> having only a single timer is best? Or should I switch back to a timer per >> cpu? With a timer per cpu we can simply reset the timer immediately after >> the sleep. > > It's okay to have a single timer, only the formulas have to be > corrected: either you remove the pct/(1-pct) from the callback or you > add a /(1-pct) to the timer_mod. > > Paolo Paolo, You are correct here. I've adjusted the timer formula and tested. Everything seems to be playing nicely now. Sorry it took me a month to get to this. I got pulled into some critical work and improved auto-converge took a back seat. I know it is a pain to go back to something you have not seen in a month so I appreciate any attention this gets :). A new patch set will be inbound shortly... -- -- Jason J. Herne (jjherne@linux.vnet.ibm.com)