[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJd=RBALNtedfq+PLPnGKd4i4D0mLiVPdW_7pWWopnSZNC_vqA@mail.gmail.com>
Date: Wed, 22 Feb 2012 20:35:34 +0800
From: Hillf Danton <dhillf@...il.com>
To: Linux-MM <linux-mm@...ck.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Michal Hocko <mhocko@...e.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Hillf Danton <dhillf@...il.com>
Subject: [PATCH] mm: hugetlb: bail out unmapping after serving reference page
When unmapping given VM range, we could bail out if a reference page is
supplied and it is unmapped, which is a minor optimization.
Signed-off-by: Hillf Danton <dhillf@...il.com>
---
--- a/mm/hugetlb.c Wed Feb 22 19:34:12 2012
+++ b/mm/hugetlb.c Wed Feb 22 19:50:26 2012
@@ -2280,6 +2280,9 @@ void __unmap_hugepage_range(struct vm_ar
if (pte_dirty(pte))
set_page_dirty(page);
list_add(&page->lru, &page_list);
+
+ if (page == ref_page)
+ break;
}
spin_unlock(&mm->page_table_lock);
flush_tlb_range(vma, start, end);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists