Swap delay accounting, include lock_page() delays
Subsystems (2)
PATCH 1/1 Swap delay accounting, include lock_page() delays
The delay incurred in lock_page() should also be accounted in swap delay accounting
---
mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN mm/swapfile.c~fix-delay-accounting-swap-accounting mm/swapfile.c
mm/memory.c renamed from mm/memory.c~fix-delay-accounting-swap-accounting +1 -1
@@ -2084,9 +2084,9 @@ static int do_swap_page(struct mm_structcount_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.
_
Signature · 10 lines
Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Balbir Singh
Reported-by Nick Piggin <[email protected]>The delay incurred in
lock_page()should also be accounted in swap delay accountingSigned-off-by Balbir Singh <[email protected]>
Ah right, I forgot to resend this one, sorry. Thanks for remembering.
Quoted 22 lines
---
mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -puN
mm/swapfile.c~fix-delay-accounting-swap-accountingmm/swapfile.cdiff -puNmm/memory.c~fix-delay-accounting-swap-accountingmm/memory.c
---
linux-2.6-latest/mm/memory.c~fix-delay-accounting-swap-accounting 2007-10-3
1 12:58:05.000000000 +0530 +++linux-2.6-latest-balbir/mm/memory.c2007-10-31 13:02:50.000000000 +0530 @@
-2084,9 +2084,9 @@ static int do_swap_page(structmm_structmm/memory.c renamed from mm/memory.c~fix-delay-accounting-swap-accounting +1
-1count_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.
Quoted 1 line
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · Nick Piggin
Quoted 6 lines · Balbir Singh
Reported-by Nick Piggin <[email protected]>The delay incurred in
lock_page()should also be accounted in swap delay accountingSigned-off-by Balbir Singh <[email protected]>Ah right, I forgot to resend this one, sorry. Thanks for remembering.
Although, I think I had a bit more detail in the changelog which I think should be kept.
Basically, swap delay accounting seems quite broken as of now, because what it is counting is the time required to allocate a new page and submit the IO, but not actually the time to perform the IO at all (which I'd expect will be significant, although possibly in some workloads the actual page allocation will dominate).
Quoted 16 lines
Quoted 16 lines
---
mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff -puN
mm/swapfile.c~fix-delay-accounting-swap-accountingmm/swapfile.cdiff -puNmm/memory.c~fix-delay-accounting-swap-accountingmm/memory.c---
linux-2.6-latest/mm/memory.c~fix-delay-accounting-swap-accounting 2007-10
-3 1 12:58:05.000000000 +0530 +++linux-2.6-latest-balbir/mm/memory.c2007-10-31 13:02:50.000000000 +0530mm/memory.c renamed from mm/memory.c~fix-delay-accounting-swap-accounting +0
-0@@ -2084,9 +2084,9 @@ static int do_swap_page(struct mm_structcount_vm_event (PGMAJFAULT ); }
Quoted 8 lines
Quoted 8 lines
mm/memory.c renamed from mm/memory.c~fix-delay-accounting-swap-accounting +1
-1-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. _
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Nick Piggin
Quoted 8 lines · Nick Piggin
Quoted 6 lines · Balbir Singh
Reported-by Nick Piggin <[email protected]>The delay incurred in
lock_page()should also be accounted in swap delay accountingSigned-off-by Balbir Singh <[email protected]>Ah right, I forgot to resend this one, sorry. Thanks for remembering.
Quoted 9 lines
Although, I think I had a bit more detail in the changelog which I think should be kept.
Basically, swap delay accounting seems quite broken as of now, because what it is counting is the time required to allocate a new page and submit the IO, but not actually the time to perform the IO at all (which I'd expect will be significant, although possibly in some workloads the actual page allocation will dominate).
This looks quite good to me. I'm off attending a wedding, I'll resend the patch when I am back.
Signature · 10 lines
Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>