From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 1F4142946 for ; Mon, 12 Sep 2016 15:56:47 +0200 (CEST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95839800A8; Mon, 12 Sep 2016 13:56:46 +0000 (UTC) Received: from [10.36.7.9] (vpn1-7-9.ams2.redhat.com [10.36.7.9]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8CDuixt031621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Sep 2016 09:56:45 -0400 To: Zhihong Wang , dev@dpdk.org References: <1471319402-112998-1-git-send-email-zhihong.wang@intel.com> <1473392368-84903-1-git-send-email-zhihong.wang@intel.com> <3a40c167-c21e-8cb6-33ae-6043cb13b463@redhat.com> Cc: yuanhan.liu@linux.intel.com, thomas.monjalon@6wind.com From: Maxime Coquelin Message-ID: <6177acfd-c97b-fb72-0c94-d71377a00aaf@redhat.com> Date: Mon, 12 Sep 2016 15:56:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <3a40c167-c21e-8cb6-33ae-6043cb13b463@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 12 Sep 2016 13:56:46 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v5 0/6] vhost: optimize enqueue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2016 13:56:47 -0000 On 09/12/2016 03:52 PM, Maxime Coquelin wrote: > Hi, > > On 09/09/2016 05:39 AM, Zhihong Wang wrote: >> This patch set optimizes the vhost enqueue function. >> >> It implements the vhost logic from scratch into a single function >> designed >> for high performance and good maintainability, and improves CPU >> efficiency >> significantly by optimizing cache access, which means: >> >> * Higher maximum throughput can be achieved for fast frontends like >> DPDK >> virtio pmd. >> >> * Better scalability can be achieved that each vhost core can support >> more connections because it takes less cycles to handle each single >> frontend. >> >> This patch set contains: >> >> 1. A Windows VM compatibility fix for vhost enqueue in 16.07 release. >> >> 2. A baseline patch to rewrite the vhost logic. >> >> 3. A series of optimization patches added upon the baseline. >> >> The main optimization techniques are: >> >> 1. Reorder code to reduce CPU pipeline stall cycles. >> >> 2. Batch update the used ring for better efficiency. >> >> 3. Prefetch descriptor to hide cache latency. >> >> 4. Remove useless volatile attribute to allow compiler optimization. >> >> Code reordering and batch used ring update bring most of the performance >> improvements. >> >> In the existing code there're 2 callbacks for vhost enqueue: >> >> * virtio_dev_merge_rx for mrg_rxbuf turned on cases. >> >> * virtio_dev_rx for mrg_rxbuf turned off cases. >> >> The performance of the existing code is not optimal, especially when the >> mrg_rxbuf feature turned on. Besides, having 2 callback paths increases >> maintenance efforts. >> >> Also, there's a compatibility issue in the existing code which causes >> Windows VM to hang when the mrg_rxbuf feature turned on. >> >> --- >> Changes in v5: >> >> 1. Rebase to the latest branch. >> >> 2. Rename variables to keep consistent in naming style. >> >> 3. Small changes like return value adjustment and vertical alignment. >> >> 4. Add details in commit log. > Just tried to apply your series without success. > Apparently, it is not based directly on master branch, > as it lacks some SHA-1 information. > > Could you rebase it against master please? Ok, it is in fact based on top of: git://dpdk.org/next/dpdk-next-virtio master For v6, if any, could you add this info to the cover letter please? Thanks, Maxime