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.5 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 7570AC433F5 for ; Wed, 8 Sep 2021 21:11:11 +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 21AAE60C3E for ; Wed, 8 Sep 2021 21:11:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 21AAE60C3E 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]:54916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO4qc-0000ji-1h for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 17:11:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4pC-0008H2-Ua for qemu-devel@nongnu.org; Wed, 08 Sep 2021 17:09:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4p8-0008Hy-81 for qemu-devel@nongnu.org; Wed, 08 Sep 2021 17:09:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631135377; 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=D3bGGYDO5bHcMuVtU9sZgEGv4sXyU8RACnLB5eCr2Zs=; b=SXxh32IL15ecxMuAkMZakknzWsE1VW7UEUx7Hj9h1uNdLPhuZLPc+sJq7oahrss7zg3+Nq D3VA1RUn++EDx8sE2/WmYOSdRT4WnMbpDUxYXEY6zAvd1jZQiXgGatNhMFxrWIkVahIASl MrGfAAsRyYHUjn1F2reaHGKhZta/Dbs= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-B3BTYm9_MGOHvlelMH49-w-1; Wed, 08 Sep 2021 17:09:36 -0400 X-MC-Unique: B3BTYm9_MGOHvlelMH49-w-1 Received: by mail-io1-f69.google.com with SMTP id g2-20020a6b7602000000b005be59530196so3048117iom.0 for ; Wed, 08 Sep 2021 14:09:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=D3bGGYDO5bHcMuVtU9sZgEGv4sXyU8RACnLB5eCr2Zs=; b=ULqUVey/NI4x3567gOyYJEmj+rnswXuEtvxNmEhMBmC+TxiLz8EKQC3Cn/My8UHXTh svBBZlZI5EYIiSczJEJsuvtbsoscEL/S4VqRhfDCVR8F94CnqgyWZLg5G31lLpoUIs7F 7f3uNYWLUGVAWZi9J0yTzOb2bUuUmrX0ekfjz03YlQbYGmxp6hrhad4VPznMZN1GTzHH sTL9gq4I5gDUQ/kSEIU0YQji3ioXygq7stoBjJLKspxneeMDd7KTqC3i5HtrU6D9iu7A okekTXBzohcEHDhBAX72AwGQ1nE0AUWXsyIJ9Ze/sJipqCxf5Tx/GuQI9WcPG7JNsZjk DZfg== X-Gm-Message-State: AOAM531ZoaD0/YG+ACkdOdD6e1X64ysQqBNj9iiuqf963uiLnbHR27nL iL5czG3tPZ7Jyq7dY8ZpSfIsYgEteJnH/CRQqFY04MYUEULnZMWiwYL6lIL75+2zAF78viqy2xw /36+X3/iezinRK04= X-Received: by 2002:a6b:ce17:: with SMTP id p23mr232347iob.90.1631135375749; Wed, 08 Sep 2021 14:09:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfgUFaWtlFQPGZD7hxgCosN/shYwnse9CmxqpxbxapZ4P6F63D8lbPuLGL9SAdVqDKUgO22A== X-Received: by 2002:a6b:ce17:: with SMTP id p23mr232320iob.90.1631135375402; Wed, 08 Sep 2021 14:09:35 -0700 (PDT) Received: from t490s ([2607:fea8:56a3:500::ad7f]) by smtp.gmail.com with ESMTPSA id c23sm138583ioi.31.2021.09.08.14.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 14:09:34 -0700 (PDT) Date: Wed, 8 Sep 2021 17:09:33 -0400 From: Peter Xu To: Leonardo Bras Soares Passos Subject: Re: [PATCH v1 2/3] io: Add zerocopy and errqueue Message-ID: References: <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: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 , Jagannathan Raman , qemu-block@nongnu.org, Juan Quintela , qemu-devel , Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= , "Dr. David Alan Gilbert" , Paolo Bonzini , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Fam Zheng Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Sep 08, 2021 at 05:25:50PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 7, 2021 at 8:06 AM Dr. David Alan Gilbert > wrote: > > > 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; > > 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. > > > > Dave > > Well, that's the thing: as we don't copy the buffer in MSG_ZEROCOPY, we will in > fact have the same page in flight twice, instead of two versions, > given the buffer is > sent as it is during transmission. That's an interesting point, which looks even valid... :) There can still be two versions depending on when the page is read and feed to the NICs as the page can be changing during the window, but as long as the latter sent page always lands later than the former page on dest node then it looks ok. -- Peter Xu