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

Stephen Hemminger stephen at networkplumber.org
Fri Sep 4 19:18:45 CEST 2020


On Fri, 4 Sep 2020 10:22:28 +0100
Bruce Richardson <bruce.richardson at intel.com> wrote:

> > +def set_pages(pages, hugepgsz):
> > +    '''Sets the numberof huge pages to be reserved'''
> > +    if is_numa():
> > +        set_numa_pages(pages, hugepgsz)
> > +    else:
> > +        set_non_numa_pages(pages, hugepgsz)
> > +  
> 
> I'm not sure I agree with this behaviour for numa nodes. When a size is
> specified on a numa system we probably don't want to reserve that size on
> all nodes. I think one of two other options actually makes more sense:
> 1. Divide up the allocation equally between all nodes
> 2. Require the user to specify a numa node for the allocation.
> 
> Option #2 is best, I think.

I was just reproducing what old script does for now.

How about a --node option to do a single node and by default divide by number of nodes?

> I think the trend in python is to use argparse rather than getopt, though
> personally I don't have strong feelings about the issue.

Used getopt because that is what devbind was using.


More information about the dev mailing list