From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D7BDC433E0 for ; Wed, 17 Mar 2021 10:46:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5BCF64F21 for ; Wed, 17 Mar 2021 10:46:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5BCF64F21 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dme.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMTh5-0000TB-N7 for qemu-devel@archiver.kernel.org; Wed, 17 Mar 2021 06:46:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMTec-00073q-Eg for qemu-devel@nongnu.org; Wed, 17 Mar 2021 06:43:54 -0400 Received: from forward2-smtp.messagingengine.com ([66.111.4.226]:58477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMTeZ-0003Mk-IJ for qemu-devel@nongnu.org; Wed, 17 Mar 2021 06:43:54 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id 13FAE1940E70; Wed, 17 Mar 2021 06:43:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 17 Mar 2021 06:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=VljwEYhs5pd1k03HzEN1oKfCAWJ+iMPIps8bsuyIR ts=; b=YbERqIVbkgdNcMWATc8PKVP2beNYxG5pUdBcK6SAcIha03vV/ZNkJjZBY 29fbLrbMHpq01DS57otUHPDER4AosD1RhU7WzewpBGZ6FDo1nRlD/aApTO7YkJVJ ry064xa1L5Tj/3BRk5BBPKsnn8SJPdQv8zNuTG6K7LaTyHWOOHCsXv4zPlRsUKly kaZuHBNMzSL8H2I+9sj3o/KYBtaSzxRF50M8WzBh6JbuJv2r7MWOM2juMDpuZo8e FR+SkgPftcP94qIHRba/j7pORza4l9rEIPoCsEMAK9tVL3DRqc/sJA6bzVuJbVLi /YCfbzEGzaXH6BRp+6mJ3+lCTn4vg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepvffujghfhfffkfggtgfgsehtqhertddttdejnecuhfhrohhmpeffrghvihgu ucfgughmohhnughsohhnuceoughmvgesughmvgdrohhrgheqnecuggftrfgrthhtvghrnh epteevgeeuvedvjefhkefffeffveekvdekffehueeludfgteefheeljeetuddvkefhnecu kfhppeekuddrudekjedrvdeirddvfeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepughmvgesughmvgdrohhrgh X-ME-Proxy: Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net [81.187.26.238]) by mail.messagingengine.com (Postfix) with ESMTPA id 7E446240057; Wed, 17 Mar 2021 06:43:48 -0400 (EDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id f0a68bc7; Wed, 17 Mar 2021 10:43:47 +0000 (UTC) To: Kunkun Jiang , Peter Xu Subject: Re: [PATCH v4 1/2] migration/ram: Reduce unnecessary rate limiting In-Reply-To: References: <20210316125716.1243-1-jiangkunkun@huawei.com> <20210316125716.1243-2-jiangkunkun@huawei.com> <20210316213906.GF395976@xz-x1> X-HGTTG: heart-of-gold From: David Edmondson Date: Wed, 17 Mar 2021 10:43:47 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: neutral client-ip=66.111.4.226; envelope-from=dme@dme.org; helo=forward2-smtp.messagingengine.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juan Quintela , "open list:All patches CC here" , "Dr . David Alan Gilbert" , =?utf-8?Q?C=C3=A9dric?= Le Goater , Alexey Romko , Zenghui Yu , wanghaibin.wang@huawei.com, Keqian Zhu , Andrey Gruzdev Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wednesday, 2021-03-17 at 09:37:11 +08, Kunkun Jiang wrote: > Hi=C2=A0 Peter, > > On 2021/3/17 5:39, Peter Xu wrote: >> On Tue, Mar 16, 2021 at 08:57:15PM +0800, Kunkun Jiang wrote: >>> When the host page is a huge page and something is sent in the >>> current iteration, migration_rate_limit() should be executed. >>> If not, it can be omitted. >>> >>> Signed-off-by: Keqian Zhu >>> Signed-off-by: Kunkun Jiang >>> Reviewed-by: David Edmondson >>> --- >>> migration/ram.c | 9 +++++++-- >>> 1 file changed, 7 insertions(+), 2 deletions(-) >>> >>> diff --git a/migration/ram.c b/migration/ram.c >>> index 72143da0ac..3eb5b0d7a7 100644 >>> --- a/migration/ram.c >>> +++ b/migration/ram.c >>> @@ -2015,8 +2015,13 @@ static int ram_save_host_page(RAMState *rs, Page= SearchStatus *pss, >>>=20=20=20 >>> pages +=3D tmppages; >>> pss->page++; >>> - /* Allow rate limiting to happen in the middle of huge pages */ >>> - migration_rate_limit(); >>> + /* >>> + * Allow rate limiting to happen in the middle of huge pages if >>> + * something is sent in the current iteration. >>> + */ >>> + if (pagesize_bits > 1 && tmppages > 0) { >>> + migration_rate_limit(); >>> + } >> Sorry I'm still not a fan of this - I'd even prefer calling that once mo= re just >> to make sure it won't be forgotten to be called.. Not to say it's merel= y a noop. >> >> I'll leave this to Dave.. Maybe I'm too harsh! :) >> > You are very serious and meticulous. I like your character very much.=F0= =9F=98=89 > This patch was used to reviewed by David. So, I want to know what > his opinion is. > > @David > Hi David, what is your opinion on this patch? I suspect that this referred to David Gilbert rather than me :-) > Thanks, > Kunkun Jiang dme. --=20 Time is waiting to explain, why refuse?