[dpdk-dev] [PATCH] usertools: add huge page setup script

Stephen Hemminger stephen at networkplumber.org
Wed Sep 2 16:50:30 CEST 2020


On Wed, 2 Sep 2020 10:55:07 +0100
Bruce Richardson <bruce.richardson at intel.com> wrote:

> On Tue, Sep 01, 2020 at 09:56:43AM -0700, Stephen Hemminger wrote:
> > This is an improved version of the setup of huge pages
> > bases on earlier DPDK setup. Differences are:
> >    * it autodetects NUMA vs non NUMA
> >    * it allows setting different page sizes
> >      recent kernels support multiple sizes.
> >    * it accepts a parameter in bytes (not pages).
> > 
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> > ---
> > This is lightly tested, it still needs testing on multiple architectures
> > etc.
> > 
> >  usertools/hugepage-setup.sh | 169 ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 169 insertions(+)
> >  create mode 100755 usertools/hugepage-setup.sh
> > 
> > diff --git a/usertools/hugepage-setup.sh b/usertools/hugepage-setup.sh
> > new file mode 100755
> > index 000000000000..df132e2f8d64
> > --- /dev/null
> > +++ b/usertools/hugepage-setup.sh
> > @@ -0,0 +1,169 @@
> > +#! /bin/bash  
> 
> Is there a good reason to limit this to bash rather than general "sh"?
> 
> Also, if we ever see this script being expanded to cover more, would it be
> more extensible in python rather than shell?

Mainly because bash has arithmetic operations, and doing it with normal shell
requires using expr.


More information about the dev mailing list