From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Date: Tue, 13 Jun 2006 13:22:23 +0200 Message-Id: <20060613112223.27913.72206.sendpatchset@lappy> In-Reply-To: <20060613112120.27913.71986.sendpatchset@lappy> References: <20060613112120.27913.71986.sendpatchset@lappy> Subject: [PATCH 6/6] mm: remove some update_mmu_cache() calls Sender: owner-linux-mm@kvack.org Return-Path: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Hugh Dickins , Andrew Morton , David Howells , Peter Zijlstra , Christoph Lameter , Martin Bligh , Nick Piggin , Linus Torvalds List-ID: From: Christoph Lameter This may be a bit controversial but it does not seem to make sense to use the update_mmu_cache macro when we reuse the page. We are only fiddling around with the protections, the dirty and accessed bits. With the call to update_mmu_cache the way of using the macros would be different from mprotect() and page_mkclean(). I'd rather have everything work the same way. If this breaks on some arches then also mprotect and page_mkclean() are broken. The use of mprotect() is rare, we may have breakage in some arches that we just have not seen yet. Signed-off-by: Christoph Lameter Signed-off-by: Peter Zijlstra --- mm/memory.c | 2 -- 1 file changed, 2 deletions(-) Index: linux-2.6/mm/memory.c =================================================================== --- linux-2.6.orig/mm/memory.c 2006-06-13 10:33:21.000000000 +0200 +++ linux-2.6/mm/memory.c 2006-06-13 10:36:31.000000000 +0200 @@ -1477,7 +1477,6 @@ static int do_wp_page(struct mm_struct * entry = pte_mkyoung(orig_pte); entry = maybe_mkwrite(pte_mkdirty(entry), vma); ptep_set_access_flags(vma, address, page_table, entry, 1); - update_mmu_cache(vma, address, entry); lazy_mmu_prot_update(entry); ret |= VM_FAULT_WRITE; goto unlock; @@ -2263,7 +2262,6 @@ static inline int handle_pte_fault(struc entry = pte_mkyoung(entry); if (!pte_same(old_entry, entry)) { ptep_set_access_flags(vma, address, pte, entry, write_access); - update_mmu_cache(vma, address, entry); lazy_mmu_prot_update(entry); } else { /* -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org