MCPcopy Create free account
hub / github.com/F-Stack/f-stack / main

Function main

dpdk/usertools/dpdk-hugepages.py:204–303  ·  view source on GitHub ↗

Process the command line arguments and setup huge pages

()

Source from the content-addressed store, hash-verified

202
203
204def main():
205 '''Process the command line arguments and setup huge pages'''
206 parser = argparse.ArgumentParser(
207 formatter_class=argparse.RawDescriptionHelpFormatter,
208 description="Setup huge pages",
209 epilog="""
210Examples:
211
212To display current huge page settings:
213 %(prog)s -s
214
215To a complete setup of with 2 Gigabyte of 1G huge pages:
216 %(prog)s -p 1G --setup 2G
217""")
218 parser.add_argument(
219 '--show',
220 '-s',
221 action='store_true',
222 help="print the current huge page configuration")
223 parser.add_argument(
224 '--clear', '-c', action='store_true', help="clear existing huge pages")
225 parser.add_argument(
226 '--mount',
227 '-m',
228 action='store_true',
229 help='mount the huge page filesystem')
230 parser.add_argument(
231 '--unmount',
232 '-u',
233 action='store_true',
234 help='unmount the system huge page directory')
235 parser.add_argument(
236 '--directory',
237 '-d',
238 metavar='DIR',
239 default=HUGE_MOUNT,
240 help='mount point')
241 parser.add_argument(
242 '--user',
243 '-U',
244 metavar='UID',
245 help='set the mounted directory owner user')
246 parser.add_argument(
247 '--group',
248 '-G',
249 metavar='GID',
250 help='set the mounted directory owner group')
251 parser.add_argument(
252 '--node', '-n', help='select numa node to reserve pages on')
253 parser.add_argument(
254 '--pagesize',
255 '-p',
256 metavar='SIZE',
257 help='choose huge page size to use')
258 parser.add_argument(
259 '--reserve',
260 '-r',
261 metavar='SIZE',

Callers 1

dpdk-hugepages.pyFile · 0.70

Calls 9

get_memsizeFunction · 0.85
default_pagesizeFunction · 0.85
clear_pagesFunction · 0.85
umount_hugeFunction · 0.85
reserve_pagesFunction · 0.85
mount_hugeFunction · 0.85
show_pagesFunction · 0.85
show_mountFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected