Commit 8f34fb8
committed
mpool/hugepage: fix sizing of hugepages
Really old code was still preferring to parse Linux's /proc/mounts to
find the size of hugepages instead of just using statfs() or statvfs()
to get the size directly.
Thanks to @wangshaochuang for noticing that the parsing of
/proc/mounts wasn't even quite right in modern Linux systems, we have
changed the preference in the code to use statfs() / statvfs() if
available (which it almost certainly will be), and only fall back to
parsing /proc/mounts on really, really, really old systems (where the
/proc/mounts parsing will likely be correct).
Signed-off-by: Jeff Squyres <jeff@squyres.com>1 parent 1d301f7 commit 8f34fb8
1 file changed
+21
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
| |||
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
235 | 246 | | |
236 | 247 | | |
237 | 248 | | |
| |||
240 | 251 | | |
241 | 252 | | |
242 | 253 | | |
243 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
244 | 262 | | |
245 | 263 | | |
246 | 264 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 265 | | |
| 266 | + | |
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
| |||
0 commit comments