summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2007-11-14 17:00:33 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 18:45:44 -0800
commit20a1022d4ac5c53f0956006fd9e30cf4846d5e58 (patch)
tree460b50d2e58b23c55d5984e1a530ee76a312dda9 /mm/memory.c
parent9c8d6381dc107dbc2bfdbfdcaefe0d42e5b5b362 (diff)
downloadlinux-20a1022d4ac5c53f0956006fd9e30cf4846d5e58.tar.bz2
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 <nickpiggin@yahoo.com.au> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 7b0403bfc97f..4bf0b6d0eb2a 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.