Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f300ea49 authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds
Browse files

mm: remove khugepaged double thp vmstat update with CONFIG_NUMA=n



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: default avatarAndrea Arcangeli <aarcange@redhat.com>
Reported-by: default avatarJohannes Weiner <jweiner@redhat.com>
Acked-by: default avatarRik van Riel <riel@redhat.com>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Acked-by: default avatarJohannes Weiner <jweiner@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ada9c933
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -2234,11 +2234,8 @@ static void khugepaged_loop(void)
	while (likely(khugepaged_enabled())) {
	while (likely(khugepaged_enabled())) {
#ifndef CONFIG_NUMA
#ifndef CONFIG_NUMA
		hpage = khugepaged_alloc_hugepage();
		hpage = khugepaged_alloc_hugepage();
		if (unlikely(!hpage)) {
		if (unlikely(!hpage))
			count_vm_event(THP_COLLAPSE_ALLOC_FAILED);
			break;
			break;
		}
		count_vm_event(THP_COLLAPSE_ALLOC);
#else
#else
		if (IS_ERR(hpage)) {
		if (IS_ERR(hpage)) {
			khugepaged_alloc_sleep();
			khugepaged_alloc_sleep();