diff options
author | Miaohe Lin <[email protected]> | 2021-02-24 12:10:14 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-02-24 13:38:35 -0800 |
commit | a25fddced835ae53d18eb4bddabd719b4cebf624 (patch) | |
tree | 08956ce1596f3960a428aacd08459aa5c2a6400f /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 88ce3fef47f3f382985ecefe8f290b6ff05b4335 (diff) |
hugetlbfs: make hugepage size conversion more readable
The calculation 1U << (h->order + PAGE_SHIFT - 10) is actually equal to
(PAGE_SHIFT << (h->order)) >> 10. So we can make it more readable by
replace it with huge_page_size(h) >> 10.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions