[dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample Application guide

Xie, Huawei huawei.xie at intel.com
Thu Dec 10 13:10:05 CET 2015



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Iremonger, Bernard
> Sent: Thursday, December 10, 2015 5:59 PM
> To: Yuanhan Liu
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample
> Application guide
> 
> Hi Yuanhan,
> 
> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com]
> > Sent: Thursday, December 10, 2015 6:53 AM
> > To: Iremonger, Bernard <bernard.iremonger at intel.com>
> > Cc: dev at 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 needed.
> 
> I will add more information to the commit message.
> 
> 
> > >
> > > changes in v2:
> > > remove "user at 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 <bernard.iremonger at intel.com>
> > > ---
> > ...
> > >
> > > @@ -386,13 +386,15 @@ Running the Sample Code
> > >
> > >      .. code-block:: console
> > >
> > > -        user at 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, all
> > 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
> 
> Yes the --socket-mem  <number> option is necessary.
> I will add a note that a value of  <number> may need to be greater than
> 1024.
> I will submit a patch to vhost-switch to reduce the number of mbufs.
> 
I recall we have to allocate mbufs for each queue rather than used queues only, so memory consumption depends on queue number. After that issue is fixed, I think 1024MB is enough. For the time being, you could temporarily use 2048M and add an explanation.

> Regards,
> 
> Bernard.



More information about the dev mailing list