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

Function mount_huge

dpdk/usertools/dpdk-hugepages.py:173–186  ·  view source on GitHub ↗

Mount the huge TLB file system

(pagesize, mountpoint, user, group)

Source from the content-addressed store, hash-verified

171
172
173def mount_huge(pagesize, mountpoint, user, group):
174 '''Mount the huge TLB file system'''
175 if mountpoint in get_mountpoints():
176 print(mountpoint, "already mounted")
177 return
178 cmd = "mount -t hugetlbfs"
179 if pagesize:
180 cmd += ' -o pagesize={}'.format(pagesize * 1024)
181 if user:
182 cmd += ' -o uid=' + user
183 if group:
184 cmd += ' -o gid=' + group
185 cmd += ' nodev ' + mountpoint
186 os.system(cmd)
187
188
189def umount_huge(mountpoint):

Callers 1

mainFunction · 0.85

Calls 2

get_mountpointsFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected