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 A876D8E5F for ; Thu, 10 Dec 2015 13:10:22 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 10 Dec 2015 04:10:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,407,1444719600"; d="scan'208";a="838416009" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 10 Dec 2015 04:10:09 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Dec 2015 04:10:08 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Dec 2015 04:10:07 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.28]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.92]) with mapi id 14.03.0248.002; Thu, 10 Dec 2015 20:10:05 +0800 From: "Xie, Huawei" To: "Iremonger, Bernard" , Yuanhan Liu Thread-Topic: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample Application guide Thread-Index: AQHRMxc12dxOorfyRBiDtUr7CU+d+Z7D+jdQgAAmCGA= Date: Thu, 10 Dec 2015 12:10:05 +0000 Message-ID: References: <1449664541-9546-1-git-send-email-bernard.iremonger@intel.com> <1449681518-27656-1-git-send-email-bernard.iremonger@intel.com> <20151210065247.GT29571@yliu-dev.sh.intel.com> <8CEF83825BEC744B83065625E567D7C219F8EC44@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C219F8EC44@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample Application guide 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, 10 Dec 2015 12:10:23 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Iremonger, Bernard > Sent: Thursday, December 10, 2015 5:59 PM > To: Yuanhan Liu > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample > Application guide >=20 > Hi Yuanhan, >=20 > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Thursday, December 10, 2015 6:53 AM > > To: Iremonger, Bernard > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample > > Application guide > > > > On Wed, Dec 09, 2015 at 05:18:38PM +0000, Bernard Iremonger wrote: > > > correct sample console commands > > > > You'd state what exactly this patch corrects here, and why is that need= ed. >=20 > I will add more information to the commit message. >=20 >=20 > > > > > > changes in v2: > > > remove "user@target:~$" prefixes in command lines. > > > use continuation character to stay within 80 character limit. > > > wrap sample python code. > > > > > > Fixes: d0dff9ba445e ("doc: sample application user guide" > > > Fixes: 9bc23cb8209c ("doc: add vhost-user to sample guide") > > > Fixes: 43866bf71d58 ("doc: fix vhost sample parameter") > > > Signed-off-by: Bernard Iremonger > > > --- > > ... > > > > > > @@ -386,13 +386,15 @@ Running the Sample Code > > > > > > .. code-block:: console > > > > > > - user@target:~$ ./build/app/vhost-switch -c f -n 4 --huge-dir= / > > mnt/huge -- -p 0x1 --dev-basename usvhost > > > + ./vhost-switch -c f -n 4 --socket-mem 1024 --huge-dir > /mnt/huge \ > > > + -- -p 0x1 --dev-basename usvhost > > > > I don't think that's a right "correction": vhost-swtich would fail to > > start: > > > > EAL: Error - exiting with code: 1 > > Cause: Cannot create mbuf pool > > > > As vhost-switch creates more mbuf than 1024M can hold. > > > > However, I do think that adding this option is necessary, otherwise, al= l > > hugepages will be allocated to vhost-switch, leaving no memory for > starting > > VM at all. (And this is kind of informatin you need to put into commit > log). > > > > And limiting it to "1024M" is reasonable as well, so that we can run it > on a > > desktop (or laptop) without too many memories. You just need fix vhost- > > switch example to not allocate too many mbufs by default. > > > > --yliu >=20 > Yes the --socket-mem option is necessary. > I will add a note that a value of may need to be greater than > 1024. > I will submit a patch to vhost-switch to reduce the number of mbufs. >=20 I recall we have to allocate mbufs for each queue rather than used queues o= nly, so memory consumption depends on queue number. After that issue is fix= ed, I think 1024MB is enough. For the time being, you could temporarily use= 2048M and add an explanation. > Regards, >=20 > Bernard.