Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2108212imm; Thu, 11 Oct 2018 05:21:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Le6rufAYSSzlC2DeaY+b/8RzuzMZjr4vCOJzok6TJhvsdYN8XGWIiseRhOaHM6LYRlCRp X-Received: by 2002:a17:902:3143:: with SMTP id w61-v6mr1368941plb.85.1539260491926; Thu, 11 Oct 2018 05:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539260491; cv=none; d=google.com; s=arc-20160816; b=JvuMUMH7PzznvDupO//riaKRWH1yrAD3onzYNEYWI3O+TzA6DoPM8oRq1S99DqcDeA Vd4/z5fn+rmRgXzM+L75vXhJCrPLUIVtCraQlQLiOAabC5E+ufD3JVsFcooXDsMRHpIp 1m3j76V68UH7HncrmTESJ9CnrhIauN9e8ZAHajuVLDv938wXqgo/6uEMKfj/PbuMmuJW PCUwka1GkcZZ3ryjo+C3c42Hf9v9A98dVttO/4WagUVBk1SoGHrjqTF/F3GTK3ZhY9Hx e5gV/YclJoKIayMdhnJEudpe7q8/FwmZQ4kNbC/fcEzoPMtDEW7ccDRcXLy0LRQv0AH+ hm3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6dgoQg1lbXNF6Z6gQaBrdV5vU102BT4xcRcsU0S+xNk=; b=Smb9S2t4NQLJmvuj8sldGvNQZ5BbJ8JDjHJtXcdtpEy13XzsGbCxOmHKWPrIpZemrU BpKRVJ/jwpgh0JaGpIw01IuZ5wSClEbGdFOkA2MegrgDS5mMYzvZxcvmss/OEI9NgjwB oAwaJ8UhG7d8gFoWkR9dvfw36sbwx5w7ljooWQd663Fm2yW9qALqbtn9ik6HyrUWcY7e bVHJB7tSmtkL2+3Qhxz3/LRW+UTPUktqpaFzizpQxyy0VCnXjPFkmF3hwlejObbYxJY0 CYAQH1MjWi2XLKIy9W0t63zK1w+yk9oTph8vIKSaGRi73Wi9iEO/KnNvQqZydF5P+GTv Zc1A== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si2209286pls.32.2018.10.11.05.21.17; Thu, 11 Oct 2018 05:21:31 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728347AbeJKTkn (ORCPT + 99 others); Thu, 11 Oct 2018 15:40:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:47148 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726212AbeJKTkm (ORCPT ); Thu, 11 Oct 2018 15:40:42 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 05:13:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="264809462" Received: from btwcube1.sh.intel.com (HELO debian) ([10.67.104.158]) by orsmga005.jf.intel.com with ESMTP; 11 Oct 2018 05:13:37 -0700 Date: Thu, 11 Oct 2018 20:12:21 +0800 From: Tiwei Bie To: "Michael S. Tsirkin" Cc: Jason Wang , 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: <20181011121221.GA27106@debian> References: <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> <20181010103335-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181010103335-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 10:36:26AM -0400, Michael S. Tsirkin wrote: > 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? Yeah, definitely! > > > 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. Yeah, make sense. Besides, I have done some further profiling and debugging both in kernel driver and DPDK vhost. Previously I was mislead by a bug in vhost code. I will send a patch to fix that bug. With that bug fixed, the performance of packed ring in the test between kernel driver and DPDK vhost is better now. I will send a new series soon. Thanks! > > -- > MST