From patchwork Tue Jul 31 08:35:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 10550419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 870A313BF for ; Tue, 31 Jul 2018 08:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71C202A14F for ; Tue, 31 Jul 2018 08:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 660DC2A988; Tue, 31 Jul 2018 08:37:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1FBAB2A14F for ; Tue, 31 Jul 2018 08:37:15 +0000 (UTC) Received: from localhost ([::1]:57590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkQ9a-0001BD-A6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 31 Jul 2018 04:37:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkQ8A-00008x-Dg for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkQ87-0008Vw-Bc for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:35:46 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:46228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkQ87-0008VJ-4Y for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:35:43 -0400 Received: by mail-pg1-x542.google.com with SMTP id p23-v6so8708515pgv.13 for ; Tue, 31 Jul 2018 01:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=VVvtOWf2OUIl77MQzeIQ3EF1RbltEiIvz9PFX+gdfEw=; b=aUWjekXUzN0uwH9VFB1t1PFchHAuhZqjgfFlEcBtre3+7TGukNfQQviQUBpxZijlM+ PvoIAreyed9AYVP3LPwI890bnJ38bADpIY6m1yP+oD9GmdBNrtmy+yty1AsR8G5l8+0R /gxpiaa5Suascgh4drHdXpw9Sldw4Hfic5SXCAmHr2pPEpigkh7jQrSbSlB60nSUyLpu 5R9TbSG57WJ5Etmn/xX1L+7x+tZj4oEl24quOmcS9FGZhbJTMabRM2aSyZOnbmDh1c7Y Z9RAzKYBrp9MiXq+eWVYbrQn3vS9wMU0WYN6bOBLhjIe9ezSY3RSdl1C6kOsHK118aen nrvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VVvtOWf2OUIl77MQzeIQ3EF1RbltEiIvz9PFX+gdfEw=; b=F3Z9/5RWOz3VaW/S5wCkXUMOGhYhqnDKxaB08/iSyVJENsLjpJzpdhouXCdgEzL19M yH6yRhHfXsQP1OVneXH32HUzAUih/wYBB3QL2BIl/bLoH9Cl3HJm3mA2NIuRPGwCLHlS em3enzA2b2dp228HpqYUYTpRGJlgWxLkNVGIjUIY0tzdkWKHJjRSmU3lPLitKR+lCjVX 9+cXtuLP3NyYjJThxF2Eaa/bF1MJelhAgRsMGTPWCG/N2MTRZLcQIhsXEbKqugkVJPHE QkOloIqgRhi+MH2/A1koDPAj7fL399JKmYm5FNMwHEFWlXqOF491yqWl/XE7Po6dqr6t B9dQ== X-Gm-Message-State: AOUpUlE/esXeTHDPzT/vFHXvgOXGVBekaVgk1ydFr3tYUTWhf+xs2Jmu iVR9EkB5wXZiImFnqxELqeg= X-Google-Smtp-Source: AAOMgpcr5gpOVNo/PdBUQKHEKV5V/T13HOLPGTIWflzs0PongBdiiG2mMY27YIWhsGTlKS9/KExqAg== X-Received: by 2002:a63:cb04:: with SMTP id p4-v6mr18978334pgg.197.1533026142144; Tue, 31 Jul 2018 01:35:42 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.100]) by smtp.gmail.com with ESMTPSA id f19-v6sm23406069pfd.147.2018.07.31.01.35.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jul 2018 01:35:41 -0700 (PDT) From: Li Qiang To: pbonzini@redhat.com, crosthwaite.peter@gmail.com, rth@twiddle.net, quintela@redhat.com, dgilbert@redhat.com, eblake@redhat.com, armbru@redhat.com Date: Tue, 31 Jul 2018 01:35:21 -0700 Message-Id: <1533026124-6740-1-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH 0/3] Add a new migrate_set_max_cpu_throttle qmp command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liqiang02@corp.netease.com, Li Qiang , hzliuyingdong@corp.netease.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently, the default maximum CPU throttle for migration is 99(CPU_THROTTLE_PCT_MAX). This is too big and can make a remarkable performance effect for the guest. We see a lot of packets latency exceed 500ms when the CPU_THROTTLE_PCT_MAX reached. This patch set adds a new qmp command to limit the CPU throttle. Li Qiang (3): migrate: replace the cpu throttle percentage max with a variable migration: Add qmp command for migrate_set_max_cpu_throttle hmp: add hmp for migrate_set_max_cpu_throttle cpus.c | 9 ++++++++- hmp-commands.hx | 14 ++++++++++++++ hmp.c | 6 ++++++ hmp.h | 1 + include/qom/cpu.h | 8 ++++++++ migration/migration.c | 10 ++++++++++ qapi/migration.json | 13 +++++++++++++ 7 files changed, 60 insertions(+), 1 deletion(-)