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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D68DFC7EE26 for ; Mon, 15 May 2023 11:19:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyWDZ-0000vM-Rk; Mon, 15 May 2023 07:18:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyWDX-0000uL-Ht for qemu-devel@nongnu.org; Mon, 15 May 2023 07:18:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyWDV-0001Pa-Px for qemu-devel@nongnu.org; Mon, 15 May 2023 07:18:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684149492; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LCYKKaNQDDp3ADPQjBBlblVmNTO+RTVxuxIZT58iqJg=; b=F5leBwWxz3zL7tRDDkmnmUxTuGdKnfw2TeNkA+2FPWW6SoJfMLylGsFVjYlPiXZTK3nmY6 pBbQ6MbVfaPF6J3Sgr6b5RiczqW3dTLWW3vGWb3Cs3Uv0xSwQa2RNh79hY8d3UhWgcgjK2 7xiOE3ILBIcrCyjKZb562B3j78bR6FI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-u8ZD_wxQNnO4Y1RS4EzqMg-1; Mon, 15 May 2023 07:18:11 -0400 X-MC-Unique: u8ZD_wxQNnO4Y1RS4EzqMg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f420742d40so33262635e9.2 for ; Mon, 15 May 2023 04:18:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684149490; x=1686741490; h=content-transfer-encoding:mime-version:message-id:date:reply-to :user-agent:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LCYKKaNQDDp3ADPQjBBlblVmNTO+RTVxuxIZT58iqJg=; b=PXOpXVFMDmJ52tbcP9q+fyYbiLkapYQ7HW0WERYsq+lv8S29jvecFvORXKypqXSDDw TILfCc2KzQBYkuNV/dhwcszgEexOBitPH5+9sg06YwtvLNEUXlrqnVr8KJPVRopmk+Dr Tb0/l7JEUpQw/9glINyRfTpjxuxcLX8vVvbHe61gHdv7bgvs8nbhKMorfjUTFGE1Xlw8 CSa/nzDocU2QqrlzoS8NiKnUO7jVtEVdAp5nkyKWfc7ILgQmZ26iycPh/m0Z3/D0Gymx OcnZKVnVk1KDfzODR2xepaDJ4EecUL99PfIEqIIpGg6xagkohkX0gh/hWTfE6ZqRmx/H H8sw== X-Gm-Message-State: AC+VfDyyxHPNBYcC411Z/msPpaaH+p2VYqDfkDDH4qNp5VMfMnECrjCZ sriItJAmXtf5mcDvhLa8mJ00UD9t5OOQCweA4guCCsHinP7DSro4GNyo0HV9fXoTowl/L72wVXO j3XyjTf8ehTyOXQQ= X-Received: by 2002:a7b:cd94:0:b0:3f4:266d:5901 with SMTP id y20-20020a7bcd94000000b003f4266d5901mr18735560wmj.35.1684149490350; Mon, 15 May 2023 04:18:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5E+KW45my+R65oH70S6X2RCIrZpDNXCQUuNv/OrNtaxCYG+5SQ1oyQO+fFoQWSSqaSvS/fdA== X-Received: by 2002:a7b:cd94:0:b0:3f4:266d:5901 with SMTP id y20-20020a7bcd94000000b003f4266d5901mr18735533wmj.35.1684149490047; Mon, 15 May 2023 04:18:10 -0700 (PDT) Received: from redhat.com (static-92-120-85-188.ipcom.comunitel.net. [188.85.120.92]) by smtp.gmail.com with ESMTPSA id e26-20020a05600c219a00b003f50d6ee334sm1729070wme.47.2023.05.15.04.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 04:18:09 -0700 (PDT) From: Juan Quintela To: =?utf-8?Q?C=C3=A9dric?= Le Goater Cc: Harsh Prateek Bora , , Daniel Henrique Barboza , Christian Borntraeger , David Hildenbrand , Stefan Hajnoczi , , Eric Blake , Vladimir Sementsov-Ogievskiy , John Snow , Halil Pasic , Peter Xu , Richard Henderson , David Gibson , Eric Farman , Greg Kurz , , , Fam Zheng , Thomas Huth , Leonardo Bras , Ilya Leoshkevich Subject: Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate In-Reply-To: <0e21e709-211b-86b5-5b71-760c436e2319@kaod.org> (=?utf-8?Q?=22C=C3=A9dric?= Le Goater"'s message of "Mon, 15 May 2023 10:34:22 +0200") References: <20230508130909.65420-1-quintela@redhat.com> <20230508130909.65420-3-quintela@redhat.com> <9ab54244-b804-e066-580f-3d4e89fb7862@linux.ibm.com> <87cz39en8j.fsf@secure.mitica> <0e21e709-211b-86b5-5b71-760c436e2319@kaod.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Date: Mon, 15 May 2023 13:18:08 +0200 Message-ID: <87bkil268f.fsf@secure.mitica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: quintela@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org C=C3=A9dric Le Goater wrote: > On 5/9/23 13:51, Juan Quintela wrote: >> Harsh Prateek Bora wrote: >>> On 5/8/23 18:38, Juan Quintela wrote: >>>> Use 0 instead. >>>> Signed-off-by: Juan Quintela >>>> --- >>>> migration/migration.c | 4 ++-- >>>> migration/qemu-file.c | 3 +++ >>>> 2 files changed, 5 insertions(+), 2 deletions(-) >>>> diff --git a/migration/migration.c b/migration/migration.c >>>> index 1192f1ebf1..3979a98949 100644 >>>> --- a/migration/migration.c >>>> +++ b/migration/migration.c >>>> @@ -2296,7 +2296,7 @@ static void migration_completion(MigrationState = *s) >>>> } >>>> if (ret >=3D 0) { >>>> s->block_inactive =3D !migrate_colo(); >>>> - qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX); >>>> + qemu_file_set_rate_limit(s->to_dst_file, 0); >>> >>> #define RATE_LIMIT_MAX 0 >>> >>> How about having a macro and use that which conveys the meaning in all >>> call instances wherever it is getting passed ? >> I almost preffer the macro. >> qemu_file_set_rate_limit(s->to_dst_file, RATE_LIMIT_MAX); >> seems quite explanatory? > > yep. and I would drop the comment qemu_file_rate_limit(). I dropped it once by error. And reviewer didn't noticed either. So ....