Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp998929imm; Wed, 10 Oct 2018 07:38:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ItK3J7+SqtydqZqWJCfeYkj7nv6yhhxOmmwzVz46JHCGvBXAL/U/e2jE+5++EQMnxLFCd X-Received: by 2002:a17:902:9a48:: with SMTP id x8-v6mr32838308plv.72.1539182318744; Wed, 10 Oct 2018 07:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539182318; cv=none; d=google.com; s=arc-20160816; b=g0w+qzQKZ2pNaOqd2g8+od8gxnA1RYWvxTDUWnhdkY1MReogfObO92WF/p5zlgeLFG aKvUXq55nXkeHLPU7fJ9Nbxp1MDcsJtx4FRO0UFSoJI8SXOlikmjqtIjy6/jRhnDDorg cBdF2uTNZPWxZYY0IZrZXXVdIapvZmtBuRIDkRGfiIPmvvEpOmaN7TZx4D6qgGUMyRCp HDfH2gS5y9wxir0ws7RKR+6TLEEW9ZG9Q8eJ2760CsMBr152csbplGJkGPyeR+/F3hHe q6YJxpcysEv/Fs5b2oVtrtVXZ4kYol3My1VmwmaxAts3X81pBFYA17uipe9qmpYq38uW yckw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1wOrFwJP9ipM6rHjS8kh7xIBPhGDsl0BnhN4jDGq9+0=; b=py7MQhnpU4AilsRH1jDwLJmtNBm4rREZCkrPg/9ggRckbK+kdDiETsj3E7TZuHKhRr U9Ap2hKVUfQb2jI/oIfEC/z+sGgmGNQlnU+LEcS1qq8hEWE+D71riikQwC350R3ppXLf 3soiIFaMlftLEUV0hFoSNq2spy2GFyRfs0juWYtT77bASj5bzzA8gHHKnhzsvYoySLSv +rJME3TmiC9BeKYWOwQ698ArKKmSWjXn4efHW8OmpEJPpJft7vtnQvgpIIyDWvs7JIAj BRDVHU2VPQR9QFIqbftloNzL7pUiHAf6uKeIWPaxBu4ojs6OM2+f4zXW4w0edztAk8Ry vbgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i68-v6si25384871pgd.220.2018.10.10.07.38.24; Wed, 10 Oct 2018 07:38:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbeJJV67 (ORCPT + 99 others); Wed, 10 Oct 2018 17:58:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43498 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726656AbeJJV66 (ORCPT ); Wed, 10 Oct 2018 17:58:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CD52307D853; Wed, 10 Oct 2018 14:36:31 +0000 (UTC) Received: from redhat.com (ovpn-120-148.rdu2.redhat.com [10.10.120.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2DEF95D973; Wed, 10 Oct 2018 14:36:27 +0000 (UTC) Date: Wed, 10 Oct 2018 10:36:26 -0400 From: "Michael S. Tsirkin" To: Jason Wang Cc: Tiwei Bie , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, virtio-dev@lists.oasis-open.org, wexu@redhat.com, jfreimann@redhat.com Subject: Re: [virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring Message-ID: <20181010103335-mutt-send-email-mst@kernel.org> References: <20180711022711.7090-1-tiwei.bie@intel.com> <20180827170005-mutt-send-email-mst@kernel.org> <20180907012225.GA32677@debian> <20180907084509-mutt-send-email-mst@kernel.org> <20180910030053.GA15645@debian> <20180911053726.GA7472@debian> <20180912121457-mutt-send-email-mst@kernel.org> <20180913085919.GA42049@fbsd1.sh.intel.com> <98d6bd4d-45e2-4207-e961-782f649e0139@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98d6bd4d-45e2-4207-e961-782f649e0139@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 10 Oct 2018 14:36:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 13, 2018 at 05:47:29PM +0800, Jason Wang wrote: > > > On 2018年09月13日 16:59, Tiwei Bie wrote: > > > If what you say is true then we should take a careful look > > > and not supporting these generic things with packed layout. > > > Once we do support them it will be too late and we won't > > > be able to get performance back. > > I think it's a good point that we don't need to support > > everything in packed ring (especially these which would > > hurt the performance), as the packed ring aims at high > > performance. I'm also wondering about the features. Is > > there any possibility that we won't support the out of > > order processing (at least not by default) in packed ring? > > If I didn't miss anything, the need to support out of order > > processing in packed ring will make the data structure > > inside the driver not cache friendly which is similar to > > the case of the descriptor table in the split ring (the > > difference is that, it only happens in driver now). > > Out of order is not the only user, DMA is another one. We don't have used > ring(len), so we need to maintain buffer length somewhere even for in order > device. For a bunch of systems dma unmap is a nop so we do not really need to maintain it. It's a question of an API to detect that and optimize for it. I posted a proposed patch for that - want to try using that? > But if it's not too late, I second for a OUT_OF_ORDER feature. > Starting from in order can have much simpler code in driver. > > Thanks It's tricky to change the flag polarity because of compatibility with legacy interfaces. Why is this such a big deal? Let's teach drivers about IN_ORDER, then if devices are in order it will get enabled by default. -- MST