linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] Swap delay accounting, include lock_page() delays
  2007-10-31  7:52 [PATCH] Swap delay accounting, include lock_page() delays Balbir Singh
@ 2007-10-31  7:41 ` Nick Piggin
  2007-10-31  9:10   ` Nick Piggin
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Piggin @ 2007-10-31  7:41 UTC (permalink / raw)
  To: Balbir Singh
  Cc: Andrew Morton, Linux MM Mailing List, Linux Kernel Mailing List

On Wednesday 31 October 2007 18:52, Balbir Singh wrote:
> Reported-by: Nick Piggin <nickpiggin@yahoo.com.au>
>
> The delay incurred in lock_page() should also be accounted in swap delay
> accounting
>
> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>

Ah right, I forgot to resend this one, sorry. Thanks for remembering.


> ---
>
>  mm/memory.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN mm/swapfile.c~fix-delay-accounting-swap-accounting mm/swapfile.c
> diff -puN mm/memory.c~fix-delay-accounting-swap-accounting mm/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.c	2007-10-31 13:02:50.000000000 +0530 @@
> -2084,9 +2084,9 @@ static int do_swap_page(struct mm_struct
>  		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.
> _

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Swap delay accounting, include lock_page() delays
@ 2007-10-31  7:52 Balbir Singh
  2007-10-31  7:41 ` Nick Piggin
  0 siblings, 1 reply; 4+ messages in thread
From: Balbir Singh @ 2007-10-31  7:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nick Piggin, Linux MM Mailing List, Balbir Singh,
	Linux Kernel Mailing List


Reported-by: Nick Piggin <nickpiggin@yahoo.com.au>

The delay incurred in lock_page() should also be accounted in swap delay
accounting

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---

 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/swapfile.c~fix-delay-accounting-swap-accounting mm/swapfile.c
diff -puN mm/memory.c~fix-delay-accounting-swap-accounting mm/memory.c
--- linux-2.6-latest/mm/memory.c~fix-delay-accounting-swap-accounting	2007-10-31 12:58:05.000000000 +0530
+++ linux-2.6-latest-balbir/mm/memory.c	2007-10-31 13:02:50.000000000 +0530
@@ -2084,9 +2084,9 @@ static int do_swap_page(struct mm_struct
 		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.
_

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Swap delay accounting, include lock_page() delays
  2007-10-31  7:41 ` Nick Piggin
@ 2007-10-31  9:10   ` Nick Piggin
  2007-10-31 11:24     ` Balbir Singh
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Piggin @ 2007-10-31  9:10 UTC (permalink / raw)
  To: Balbir Singh
  Cc: Andrew Morton, Linux MM Mailing List, Linux Kernel Mailing List

On Wednesday 31 October 2007 18:41, Nick Piggin wrote:
> On Wednesday 31 October 2007 18:52, Balbir Singh wrote:
> > Reported-by: Nick Piggin <nickpiggin@yahoo.com.au>
> >
> > The delay incurred in lock_page() should also be accounted in swap delay
> > accounting
> >
> > Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
>
> 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).

>
> > ---
> >
> >  mm/memory.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff -puN mm/swapfile.c~fix-delay-accounting-swap-accounting
> > mm/swapfile.c diff -puN mm/memory.c~fix-delay-accounting-swap-accounting
> > mm/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.c	2007-10-31 13:02:50.000000000 +0530
> > @@ -2084,9 +2084,9 @@ static int do_swap_page(struct mm_struct
> >  		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.
> > _

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Swap delay accounting, include lock_page() delays
  2007-10-31  9:10   ` Nick Piggin
@ 2007-10-31 11:24     ` Balbir Singh
  0 siblings, 0 replies; 4+ messages in thread
From: Balbir Singh @ 2007-10-31 11:24 UTC (permalink / raw)
  To: Nick Piggin
  Cc: Andrew Morton, Linux MM Mailing List, Linux Kernel Mailing List

Nick Piggin wrote:
> On Wednesday 31 October 2007 18:41, Nick Piggin wrote:
>> On Wednesday 31 October 2007 18:52, Balbir Singh wrote:
>>> Reported-by: Nick Piggin <nickpiggin@yahoo.com.au>
>>>
>>> The delay incurred in lock_page() should also be accounted in swap delay
>>> accounting
>>>
>>> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
>> 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).
> 

This looks quite good to me. I'm off attending a wedding, I'll resend
the patch when I am back.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-31 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31  7:52 [PATCH] Swap delay accounting, include lock_page() delays Balbir Singh
2007-10-31  7:41 ` Nick Piggin
2007-10-31  9:10   ` Nick Piggin
2007-10-31 11:24     ` Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).