Skip to contentSkip to conversation

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

PATCH Andrea Arcangeli 4 participants 4 messages May 26, 2011 – May 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Andrea Arcangeli <[email protected]>

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).

---
 mm/huge_memory.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
mm/huge_memory.c +1 -4
@@ -2233,11 +2233,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();

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by
#1 lore raw
Quoted 11 lines · Andrea Arcangeli

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

From: Andrea Arcangeli<[email protected]>

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).

Signature · 8 lines
All rights reversed

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by
#2 lore raw
In reply to Andrea Arcangeli
Quoted 11 lines · Andrea Arcangeli

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

From: Andrea Arcangeli <[email protected]>

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).

Signature · 9 lines
Kind regards,
Minchan Kim

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#3 lore raw
In reply to Andrea Arcangeli
Quoted 11 lines · Andrea Arcangeli

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

From: Andrea Arcangeli <[email protected]>

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).

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>