Skip to contentSkip to conversation

mm-hugetlb-optimize-the-surplus-state-transfer-code-in-move_hugetlb_state.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 8, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/hugetlb: optimize the surplus state transfer code in move_hugetlb_state()
has been removed from the -mm tree. Its filename was
mm-hugetlb-optimize-the-surplus-state-transfer-code-in-move_hugetlb_state.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Miaohe Lin <[email protected]>
Subject: mm/hugetlb: optimize the surplus state transfer code in move_hugetlb_state()

We should not transfer the per-node surplus state when we do not cross the node in order to save some cpu cycles

---

 mm/hugetlb.c |    6 ++++++
 1 file changed, 6 insertions(+)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-optimize-the-surplus-state-transfer-code-in-move_hugetlb_state +6 -0
@@ -5682,6 +5682,12 @@ void move_hugetlb_state(struct page *old
 		SetHPageTemporary(oldpage);
 		ClearHPageTemporary(newpage);
 
+		/*
+		 * There is no need to transfer the per-node surplus state
+		 * when we do not cross the node.
+		 */
+		if (new_nid == old_nid)
+			return;
 		spin_lock(&hugetlb_lock);
 		if (h->surplus_huge_pages_node[old_nid]) {
 			h->surplus_huge_pages_node[old_nid]--;

_

Patches currently in -mm which might be from [email protected] are