From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E23843238 for ; Thu, 13 Oct 2016 04:52:23 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 12 Oct 2016 19:52:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,338,1473145200"; d="scan'208";a="179298558" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 12 Oct 2016 19:52:22 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 12 Oct 2016 19:52:22 -0700 Received: from bgsmsx151.gar.corp.intel.com (10.224.48.42) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 12 Oct 2016 19:52:22 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.210]) by BGSMSX151.gar.corp.intel.com ([169.254.3.220]) with mapi id 14.03.0248.002; Thu, 13 Oct 2016 08:22:19 +0530 From: "Yang, Zhiyong" To: "Liu, Yuanhan" CC: "mst@redhat.com" , "thomas.monjalon@6wind.com" , "Wang, Zhihong" , "stephen@networkplumber.org" , "dev@dpdk.org" , "qemu-devel@nongnu.org" , "maxime.coquelin@redhat.com" Thread-Topic: [dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature Thread-Index: AQHSJDfEMdxCxuWNIEy4GQkXcpemR6ClnkvAgAABUAA= Date: Thu, 13 Oct 2016 02:52:18 +0000 Message-ID: References: <20160929205047-mutt-send-email-mst@kernel.org> <2889e609-f750-a4e1-66f8-768bb07a2339@redhat.com> <20160929231252-mutt-send-email-mst@kernel.org> <20161010033744.GW1597@yliu-dev.sh.intel.com> <20161010064113-mutt-send-email-mst@kernel.org> <20161010035910.GY1597@yliu-dev.sh.intel.com> <8F6C2BD409508844A0EFC19955BE09414E7BC050@SHSMSX103.ccr.corp.intel.com> <20161010073721-mutt-send-email-mst@kernel.org> <20161011065749.GO1597@yliu-dev.sh.intel.com> <20161012032138.GH16751@yliu-dev.sh.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDcwMTM1ZjktYzcwZi00MjZiLWFiMWUtNzNiNTY5YWVmODk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InNBMTdEQSs4NE1QS0FaWlBmZmI1bTZ0TGt1VXU2MkJBdTNMMVZoUUtpcVU9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature 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: Thu, 13 Oct 2016 02:52:24 -0000 Hi, Yuanhan: > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu > Sent: Wednesday, October 12, 2016 11:22 AM > To: Michael S. Tsirkin ; Thomas Monjalon > > Cc: Wang, Zhihong ; Maxime Coquelin > ; Stephen Hemminger > ; dev@dpdk.org; qemu- > devel@nongnu.org > Subject: Re: [dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout > feature >=20 > On Tue, Oct 11, 2016 at 02:57:49PM +0800, Yuanhan Liu wrote: > > > > > > > There was an example: the vhost enqueue optmization patchset > > > > > > > from Zhihong [0] uses memset, and it introduces more than > > > > > > > 15% drop (IIRC) >=20 > Though it doesn't matter now, but I have verified it yesterday (with and > wihtout memset), the drop could be up to 30+%. >=20 > This is to let you know that it could behaviour badly if memset is not in= lined. >=20 > > > > > > > on my Ivybridge server: it has no such issue on his server th= ough. > > > > > > > > > > > > > > [0]: http://dpdk.org/ml/archives/dev/2016-August/045272.html > > > > > > > > > > > > > > --yliu > > > > > > > > > > > > I'd say that's weird. what's your config? any chance you are > > > > > > using an old compiler? > > > > > > > > > > Not really, it's gcc 5.3.1. Maybe Zhihong could explain more. > > > > > IIRC, he said the memset is not well optimized for Ivybridge serv= er. > > > > > > > > The dst is remote in that case. It's fine on Haswell but has > > > > complication in Ivy Bridge which (wasn't supposed to but) causes > serious frontend issue. > > > > > > > > I don't think gcc inlined it there. I'm using fc24 gcc 6.1.1. > > > > > > > > > So try something like this then: > > > > Yes, I saw memset is inlined when this diff is applied. >=20 > I have another concern though: It's a trick could let gcc do the inline, = I am not > quite sure whether that's ture with other compilers (i.e. clang, icc, or = even, > older gcc). >=20 > For this case, I think I still prefer some trick like > *(struct ..*) =3D {0, } >=20 > Or even, we may could introduce rte_memset(). IIRC, that has been > proposed somehow before? >=20 I'm trying to introduce rte_memset to have a prototype It have Gotten some performance enhancement For small size, I'm optimize it further= . --Zhiyong > --yliu