Skip to content

Commit

Permalink
mm: remove khugepaged double thp vmstat update with CONFIG_NUMA=n
Browse files Browse the repository at this point in the history
Johannes noticed the vmstat update is already taken care of by
khugepaged_alloc_hugepage() internally.  The only places that are required
to update the vmstat are the callers of alloc_hugepage (callers of
khugepaged_alloc_hugepage aren't).

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reported-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Jun 16, 2011
1 parent ada9c93 commit f300ea4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2234,11 +2234,8 @@ static void khugepaged_loop(void)
while (likely(khugepaged_enabled())) {
#ifndef CONFIG_NUMA
hpage = khugepaged_alloc_hugepage();
if (unlikely(!hpage)) {
count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
if (unlikely(!hpage))
break;
}
count_vm_event(THP_COLLAPSE_ALLOC);
#else
if (IS_ERR(hpage)) {
khugepaged_alloc_sleep();
Expand Down

0 comments on commit f300ea4

Please sign in to comment.