Skip to content

Commit

Permalink
mm: do_mincore() cleanup
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jianguo Wu <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: qiuxishi <[email protected]>
Reviewed-by: Naoya Horiguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jianguo Wu authored and torvalds committed Jan 24, 2014
1 parent b30afea commit c980e66
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions mm/mincore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c980e66

Please sign in to comment.