From 20a1022d4ac5c53f0956006fd9e30cf4846d5e58 Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Wed, 14 Nov 2007 17:00:33 -0800 Subject: [PATCH] Swap delay accounting, include lock_page() delays The delay incurred in lock_page() should also be accounted in swap delay accounting Reported-by: Nick Piggin Signed-off-by: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 7b0403bfc97..4bf0b6d0eb2 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2084,9 +2084,9 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, count_vm_event(PGMAJFAULT); } - delayacct_clear_flag(DELAYACCT_PF_SWAPIN); mark_page_accessed(page); lock_page(page); + delayacct_clear_flag(DELAYACCT_PF_SWAPIN); /* * Back out if somebody else already faulted in this pte.