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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 27D13C433EF for ; Tue, 7 Sep 2021 18:13:38 +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 D8DE160ED8 for ; Tue, 7 Sep 2021 18:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8DE160ED8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:50914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNfbF-0006j3-1i for qemu-devel@archiver.kernel.org; Tue, 07 Sep 2021 14:13:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNfXK-0000xQ-Lj for qemu-devel@nongnu.org; Tue, 07 Sep 2021 14:09:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNfXI-0003fa-20 for qemu-devel@nongnu.org; Tue, 07 Sep 2021 14:09:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631038171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EeQ1b28/qWilMyFg+R3KGpQTKbzwsvlwaXx9BNnXkZs=; b=OtBt9QETFUDp3LqbqJIQDzJp9vIzm8LexU4iA/x6oslMEOzPQqtkOzNrtK4gU8hiCwHoxf 1vsV3Ek9gkPMW8gT/1DNwvg7L9o4yB5mPim15fwQoM/1h5spDuAcYpU/ULar8+8vP5sNPJ XX7ICT6nka/5h54s2VdqZ3+ZA8vNqUM= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-4-3YkA9MaNN62N1ijZq0OHBw-1; Tue, 07 Sep 2021 14:09:30 -0400 X-MC-Unique: 3YkA9MaNN62N1ijZq0OHBw-1 Received: by mail-il1-f197.google.com with SMTP id w12-20020a92ad0c000000b00227fc2e6eaeso7012570ilh.4 for ; Tue, 07 Sep 2021 11:09:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EeQ1b28/qWilMyFg+R3KGpQTKbzwsvlwaXx9BNnXkZs=; b=ot5FCbBYDj3RJcbvb2XbLXeba/Rky16rrdhaorP0tgMqzrqmviHCkNmFWRbhKikk4h ZNL4PykDtkgtzgWIu+X8Z/4R2G8E7uGavMabnfdZSxnViqrc/m0tO7omXYhGL2RRhU1S ZMbRw4T7Ww4Cq3scClwmnk7kD15dD2LFsTF4+Fk8MgpOLu4H9MTMk1cg4D9MSTevilPP iPsa0mFzfVtCuGg+FH2tCGIEPtE4YYnMapHE/vxF3FN8v7Jp8MqMozgZJsfQZ0p7z14p /MrbqR4mIxxrMsjZkB3WHrPySbKgggV90V7tUvvDOlFll56lMwvl1R8g/j2Cqwc2MKP5 AeVg== X-Gm-Message-State: AOAM530ZwPPUZNiRwG/PEDUGod3VOrHP+lgXt3ll/8mXqyvduPihnEHD PfABGYD+x1wM/uDIopBHSK3pgag62mCcx/trzB5wArKh7mcGIh+PNfI3PzTdUcT2It6/LrhuKXD LOCR/TcMHL1bTsEM= X-Received: by 2002:a05:6e02:1d06:: with SMTP id i6mr13121048ila.113.1631038169271; Tue, 07 Sep 2021 11:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpiABSzfEr+7Syqhv8irEnTP3LWDZqhZj2s88CPkpyq2XUUBxbb7TPpLoiOqNAtcSo0LZUIQ== X-Received: by 2002:a05:6e02:1d06:: with SMTP id i6mr13121036ila.113.1631038169046; Tue, 07 Sep 2021 11:09:29 -0700 (PDT) Received: from t490s ([2607:fea8:56a3:500::ad7f]) by smtp.gmail.com with ESMTPSA id e1sm6793193ils.76.2021.09.07.11.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 11:09:28 -0700 (PDT) Date: Tue, 7 Sep 2021 14:09:26 -0400 From: Peter Xu To: "Dr. David Alan Gilbert" Subject: Re: [PATCH v1 2/3] io: Add zerocopy and errqueue Message-ID: References: <20210831110238.299458-1-leobras@redhat.com> <20210831110238.299458-3-leobras@redhat.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) DKIMWL_WL_HIGH=-0.391, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Elena Ufimtseva , John G Johnson , Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= , qemu-block@nongnu.org, Juan Quintela , qemu-devel , Leonardo Bras Soares Passos , Paolo Bonzini , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Fam Zheng , Jagannathan Raman Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Sep 07, 2021 at 12:06:15PM +0100, Dr. David Alan Gilbert wrote: > > > What if we do the 'flush()' before we start post-copy, instead of after each > > > iteration? would that be enough? > > > > Possibly, yes. This really need David G's input since he understands > > the code in way more detail than me. > > Hmm I'm not entirely sure why we have the sync after each iteration; We don't have that yet, do we? > the case I can think of is if we're doing async sending, we could have > two versions of the same page in flight (one from each iteration) - > you'd want those to get there in the right order. >From MSG_ZEROCOPY document: For protocols that acknowledge data in-order, like TCP, each notification can be squashed into the previous one, so that no more than one notification is outstanding at any one point. Ordered delivery is the common case, but not guaranteed. Notifications may arrive out of order on retransmission and socket teardown. So no matter whether we have a flush() per iteration before, it seems we may want one when zero copy enabled? Thanks, -- Peter Xu