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.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 CB105C433F5 for ; Wed, 8 Sep 2021 20:26:55 +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 516E561164 for ; Wed, 8 Sep 2021 20:26:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 516E561164 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]:48446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO49m-0000an-6k for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 16:26:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO48X-0007PK-Vn for qemu-devel@nongnu.org; Wed, 08 Sep 2021 16:25:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO48U-0003zy-LZ for qemu-devel@nongnu.org; Wed, 08 Sep 2021 16:25:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631132733; 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=rMZlzpFYK89uj7U0ExwkYup8kLC3NBqFLn5W2+Hoito=; b=AZqtrRoUVn3RJk3MT/njj99CFxNt6F2UM3H4rENWVeSNUH/A8NekyWay6GS0gmWt8I7g4a DzDfiCUnCSCZosvIjGZsn5urCq3Ldc0cpEF9unrsXXPCJ55BHlCUUDXZbQqFusGF4dyl8z 3lJMZqI9N40UcBgAWidTyIKihQccaSw= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-152-q2sCRuocNmOcWnxrzbjGmg-1; Wed, 08 Sep 2021 16:25:32 -0400 X-MC-Unique: q2sCRuocNmOcWnxrzbjGmg-1 Received: by mail-lf1-f72.google.com with SMTP id bp18-20020a056512159200b003eb84833c98so1213786lfb.14 for ; Wed, 08 Sep 2021 13:25:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rMZlzpFYK89uj7U0ExwkYup8kLC3NBqFLn5W2+Hoito=; b=ZMqAviFnc2kJx2jHqKGhalhlp9l0a2Py3QAl4bS7FtLB4vuw7gMhy4B9AukSaDDrD8 OHeOuI8V7QvkeESty25MTuY98XqUEatrgTureNla3+im/ac2JZgoKDr7QgJ2ZYeDpwE2 rf1/7WzeN7/hndarUdnfCqxsjYOVrEs0zjhGTPl+eQjO1oInuSiTfJVpopFFWO5jVJiq i1QM2fleyrZD8WQKQIYpKlTq8++ijCLAeyit+ULqE3ywFNjK8J5Q6l1BWe0W2sWD9weC SdtQVDmkoqUHyyD3fVImwxgwdtnxXHVZN7QsaiifpXqM8SqG03k23T1ml4hzJ8lIa0ji UnKA== X-Gm-Message-State: AOAM533PhNjSNuED84S5JnB7bVbAwTA8UrsrERS9QNOp2ClTNQMKVJpw DlLW/WtHQcULGQKmTrLrThwpxJ8f2svZxYSiXnWEeSa10RVAO/IdkclvaviKj9Mg7JJQ+HYBBUW 6GeGdINgjYP+5HLHG6dnLQaPM/3Gaoig= X-Received: by 2002:a19:c209:: with SMTP id l9mr4015911lfc.370.1631132731231; Wed, 08 Sep 2021 13:25:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfYp2IXlWuy/ug1GI6b9ofGOzBLEg9Sg5U/yBoe3LDEyqTtNUC6ZAJPIFJOBtcDzONQC2+kf1ZWdTGD9JPyfM= X-Received: by 2002:a19:c209:: with SMTP id l9mr4015881lfc.370.1631132730848; Wed, 08 Sep 2021 13:25:30 -0700 (PDT) MIME-Version: 1.0 References: <20210831110238.299458-1-leobras@redhat.com> <20210831110238.299458-3-leobras@redhat.com> In-Reply-To: From: Leonardo Bras Soares Passos Date: Wed, 8 Sep 2021 17:25:50 -0300 Message-ID: Subject: Re: [PATCH v1 2/3] io: Add zerocopy and errqueue To: "Dr. David Alan Gilbert" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lsoaresp@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=170.10.133.124; envelope-from=lsoaresp@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.393, 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 , Jagannathan Raman , qemu-block@nongnu.org, Juan Quintela , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Peter Xu , qemu-devel , Paolo Bonzini , =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= , Fam Zheng Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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. For me it looks like there will be no change in the current algorithm, but I am still a beginner in migration code, and I am probably missing something. Best regards, Leo