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

Function show_non_numa_pages

dpdk/usertools/dpdk-hugepages.py:94–103  ·  view source on GitHub ↗

Show huge page reservations on non Numa system

()

Source from the content-addressed store, hash-verified

92
93
94def show_non_numa_pages():
95 '''Show huge page reservations on non Numa system'''
96 print('Pages Size Total')
97 path = '/sys/kernel/mm/hugepages'
98 for hdir in os.listdir(path):
99 pages = get_hugepages(path + '/' + hdir)
100 if pages > 0:
101 kb = int(hdir[10:-2])
102 print('{:<5} {:<6} {}'.format(pages, fmt_memsize(kb),
103 fmt_memsize(pages * kb)))
104
105
106def show_pages():

Callers 1

show_pagesFunction · 0.85

Calls 3

get_hugepagesFunction · 0.85
fmt_memsizeFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected