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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C4F7C38145 for ; Wed, 7 Sep 2022 04:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbiIGENq (ORCPT ); Wed, 7 Sep 2022 00:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiIGENp (ORCPT ); Wed, 7 Sep 2022 00:13:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ADEA80F44 for ; Tue, 6 Sep 2022 21:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662524023; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QAjDz4sR+CkkuN65TaxyzVYEg4bR36wJx58FYQ4lykw=; b=VPhVXT1i2843BdHopm5pbxzFyuHlZ7JA5/Z4WjhypaKbbWmL5luVlufY19gpHj0NiKSAq4 PfCF/PSv2spAvweabpii3d2NOJoqFv8/vvvoUVcsHEVDOinDvTIN3cXvxptQMjWKq2L+XR JcmMyoJiVHeQKkj0OQou0fYo9eIySMo= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-119-wRpo_TfwOiakh1PHgccodQ-1; Wed, 07 Sep 2022 00:13:41 -0400 X-MC-Unique: wRpo_TfwOiakh1PHgccodQ-1 Received: by mail-pj1-f71.google.com with SMTP id z8-20020a17090a014800b001fac4204c7eso5895961pje.8 for ; Tue, 06 Sep 2022 21:13:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=QAjDz4sR+CkkuN65TaxyzVYEg4bR36wJx58FYQ4lykw=; b=pFaYdSJ5UAqWwrGFF7uvCxyiqwZOv0jLwYw/+nam3sDgIJQU9VlgTt9yC8GU1TDzi9 bdnE7xc161tQRMBjunRcW/nPS0tluwJKExbq+frsYgQiMfr7aKzDAS3gglxdr78k0cxe nX5yp5N1poTqrTaYjihoY3Ib3jXNuwR58/vZb8ENaWsDEm8BCpGHZnOSzKna4Lgvf/V+ 1OUbCAwxfj2GlOibOaHUb+CqJNLSH3SN4sM7Rwa2HQ6Kc0g+B/sbsjIa38Hwu0UUyCIY qKZ4FZJdru7C4MvNbXQqgSUtYa6OS71Q6DrWs7nB2t6yuX8H9VobwsBw93MJhe6mtpg6 1yGA== X-Gm-Message-State: ACgBeo1XE/xEoh5tIDDy8ih0pRWBodzwHxHIAHjDGg8t6fxfruS4rasC 7Za+tsRy/jEVtI2Jol/5m0JC3VIl/ugqYG49xNwVfAfnCJMkWWFwTA2+f6oA8iMcJoy7AXcUWWq qmMdRsBUwlxVv X-Received: by 2002:a17:90b:164f:b0:1f5:4ced:ed81 with SMTP id il15-20020a17090b164f00b001f54ceded81mr27894929pjb.122.1662524020662; Tue, 06 Sep 2022 21:13:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tb2znMua0rzcLRn+uEQoCxTA59Ra17knzBtFeDBJjJ2A8wstPFAsHDWkW6ISWVk/3jYZOcA== X-Received: by 2002:a17:90b:164f:b0:1f5:4ced:ed81 with SMTP id il15-20020a17090b164f00b001f54ceded81mr27894912pjb.122.1662524020456; Tue, 06 Sep 2022 21:13:40 -0700 (PDT) Received: from [10.72.13.171] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id w13-20020a1709027b8d00b0016c0eb202a5sm10856284pll.225.2022.09.06.21.13.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Sep 2022 21:13:40 -0700 (PDT) Message-ID: Date: Wed, 7 Sep 2022 12:13:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [RFC v3 0/7] In order support for virtio_ring, vhost and vsock. Content-Language: en-US To: Guo Zhi , eperezma@redhat.com, sgarzare@redhat.com, mst@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org References: <20220901055434.824-1-qtxuning1999@sjtu.edu.cn> From: Jason Wang In-Reply-To: <20220901055434.824-1-qtxuning1999@sjtu.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 在 2022/9/1 13:54, Guo Zhi 写道: > In virtio-spec 1.1, new feature bit VIRTIO_F_IN_ORDER was introduced. > When this feature has been negotiated, virtio driver will use > descriptors in ring order: starting from offset 0 in the table, and > wrapping around at the end of the table. Vhost devices will always use > descriptors in the same order in which they have been made available. > This can reduce virtio accesses to used ring. > > Based on updated virtio-spec, this series realized IN_ORDER prototype in virtio > driver and vhost. Currently IN_ORDER feature supported devices are *vhost_test* > and *vsock* in vhost and virtio-net in QEMU. IN_ORDER feature works well > combined with INDIRECT feature in this patch series. As stated in the previous versions, I'd like to see performance numbers. We need to prove that the feature actually help for the performance. And it would be even better if we do the in-order in this order (vhost side): 1) enable in-order but without batching used 2) enable in-order with batching used Then we can see how: 1) in-order helps 2) batching helps Thanks > > Virtio driver in_order support for packed vq hasn't been done in this patch > series now. > > Guo Zhi (7): > vhost: expose used buffers > vhost_test: batch used buffer > vsock: batch buffers in tx > vsock: announce VIRTIO_F_IN_ORDER in vsock > virtio: unmask F_NEXT flag in desc_extra > virtio: in order support for virtio_ring > virtio: announce VIRTIO_F_IN_ORDER support > > drivers/vhost/test.c | 16 ++++++-- > drivers/vhost/vhost.c | 16 ++++++-- > drivers/vhost/vsock.c | 13 +++++- > drivers/virtio/virtio_ring.c | 79 +++++++++++++++++++++++++++++++----- > 4 files changed, 104 insertions(+), 20 deletions(-) >