mm: do_mincore() cleanup
Subsystems (2)
PATCH 1/1 mm: do_mincore() cleanup
Two cleanups:
1. remove redundant codes for hugetlb pages.
2. end = pmd_addr_end(addr, end) restricts [addr, end) within PMD_SIZE, this may increase do_mincore() calls, remove it.
--- mm/mincore.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
mm/mincore.c +0 -7
@@ -225,13 +225,6 @@ static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *v end =min (vma->vm_end, addr + (pages <<PAGE_SHIFT )); -if (is_vm_hugetlb_page (vma)) { -mincore_hugetlb_page_range (vma, addr, end, vec); -return (end - addr) >>PAGE_SHIFT ; - } - - end =pmd_addr_end (addr, end); -if (is_vm_hugetlb_page (vma))mincore_hugetlb_page_range (vma, addr, end, vec);else
Signature · 8 lines
1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Jianguo Wu
Two cleanups:
1. remove redundant codes for hugetlb pages.
2. end =pmd_addr_end(addr, end)restricts [addr, end) withinPMD_SIZE, this may increasedo_mincore()calls, remove it.Signed-off-by Jianguo Wu <[email protected]>
Thanks!
Naoya
Quoted 32 lines
--- mm/mincore.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)mm/mincore.c +0
-7@@ -225,13 +225,6 @@ static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *v end =min (vma->vm_end, addr + (pages <<PAGE_SHIFT )); -if (is_vm_hugetlb_page (vma)) { -mincore_hugetlb_page_range (vma, addr, end, vec); -return (end - addr) >>PAGE_SHIFT ; - } - - end =pmd_addr_end (addr, end); -if (is_vm_hugetlb_page (vma))mincore_hugetlb_page_range (vma, addr, end, vec);else Signature · 8 lines
1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Naoya Horiguchi
Quoted 6 lines · Jianguo Wu
Two cleanups:
1. remove redundant codes for hugetlb pages.
2. end =pmd_addr_end(addr, end)restricts [addr, end) withinPMD_SIZE, this may increasedo_mincore()calls, remove it.Signed-off-by Jianguo Wu <[email protected]>Reviewed-by Naoya Horiguchi <[email protected]>
Hi Naoya, thanks for your review!
Jianguo Wu
Quoted 31 lines
Thanks!
Naoya
Quoted 26 lines
--- mm/mincore.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)mm/mincore.c +0
-7@@ -225,13 +225,6 @@ static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *v end =min (vma->vm_end, addr + (pages <<PAGE_SHIFT )); -if (is_vm_hugetlb_page (vma)) { -mincore_hugetlb_page_range (vma, addr, end, vec); -return (end - addr) >>PAGE_SHIFT ; - } - - end =pmd_addr_end (addr, end); -if (is_vm_hugetlb_page (vma))mincore_hugetlb_page_range (vma, addr, end, vec);else Signature · 1 line
1.7.1
Quoted 9 lines
Quoted 6 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>