From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWmp9-000175-4U for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWmp6-0001Yq-5x for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:46:11 -0400 Received: from e17.ny.us.ibm.com ([129.33.205.207]:43240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWmp5-0001Y9-PV for qemu-devel@nongnu.org; Tue, 01 Sep 2015 10:46:07 -0400 Received: from /spool/local by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Sep 2015 10:46:07 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id B756838C8041 for ; Tue, 1 Sep 2015 10:46:04 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t81Ek40K64684124 for ; Tue, 1 Sep 2015 14:46:04 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t81Ek3RN026769 for ; Tue, 1 Sep 2015 10:46:04 -0400 From: "Jason J. Herne" Date: Tue, 1 Sep 2015 10:45:58 -0400 Message-Id: <1441118763-17510-1-git-send-email-jjherne@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v5 0/5] migration: Dynamic cpu throttling for auto-converge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: afaerber@suse.de, amit.shah@redhat.com, dgilbert@redhat.com, borntraeger@de.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com Cc: "Jason J. Herne" This patch set provides a new method for throttling a vcpu and makes use of said method to dynamically increase cpu throttling during an autoconverge migration until the migration completes. This work is related to the following discussion: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg00287.html Previous version review is here: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg00734.html Changelog ----------- v5 - Add cpu->throttle_thread_scheduled flag to prevent callbacks from stacking up - Correct error in formula used to reset the timer - Add atomic operations to protect throttle_percentage - Make use of cpu_throttle_get_percentage() instead of accessing data directly - Various small formatting/style fixes v4 - Switch to a static timer - Use QEMU_CLOCK_VIRTUAL_RT instead of QEMU_CLOCK_REALTIME - Get rid of throttle_timer_stop, use throttle_percentage = 0 instead - Calculate throttle_ratio directly in cpu_throttle_thread - Consolidate timer mod operations to single function - Remove some unneeded cpu_throttle_active() checks - Check for throttle_percentage == 0 in cpu_throttle_thread - Change throttle_percentage to unsigned int - Renamed cpu_throttle_timer_pop to cpu_throttle_timer_tick v3 - Cpu throttling parameters moved from CPUState to global scope - Throttling interface now uses a percentage instead of ratio - Migration parameters added to allow tweaking of how aggressive throttling is - Add throttle active check to the throttle stop routine. - Remove asserts from throttle start/stop functions and instead force the input to fall within the acceptable range - Rename cpu_throttle_start to cpu_throttle_set to better describe its purpose - Remove unneeded object casts - Fixed monitor output formatting - Comment cleanups v2 - Add cpu throttle ratio output to hmp/qmp info/query migrate commands v1 - Initial Jason J. Herne (5): cpu: Provide vcpu throttling interface migration: Parameters for auto-converge cpu throttling migration: Dynamic cpu throttling for auto-converge qmp/hmp: Add throttle ratio to query-migrate and info migrate migration: Disambiguate MAX_THROTTLE arch_init.c | 88 ++++++++++++++++++--------------------------------- cpus.c | 78 +++++++++++++++++++++++++++++++++++++++++++++ hmp.c | 21 ++++++++++++ include/qom/cpu.h | 43 +++++++++++++++++++++++++ migration/migration.c | 57 +++++++++++++++++++++++++++++++-- qapi-schema.json | 40 ++++++++++++++++++++--- 6 files changed, 263 insertions(+), 64 deletions(-) -- 1.9.1