linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
       [not found] <379110250.28666@ustc.edu.cn>
@ 2007-05-14  5:46 ` Andrew Morton
       [not found]   ` <20070514075519.GA6255@mail.ustc.edu.cn>
  2007-05-14 18:06   ` Theodore Tso
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2007-05-14  5:46 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: linux-kernel, linux-mm, Rik van Riel, Theodore Ts'o, linux-ext4

On Mon, 14 May 2007 10:37:18 +0800 Fengguang Wu <fengguang.wu@gmail.com> wrote:

> PG_lazyfree and PG_booked shares the same bit.
> 
> Either it is a bug that shall fixed by the following patch, or
> the situation should be explicitly documented?
> 
> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
> ---
>  include/linux/page-flags.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-2.6.21-mm2.orig/include/linux/page-flags.h
> +++ linux-2.6.21-mm2/include/linux/page-flags.h
> @@ -91,7 +91,7 @@
>  #define PG_buddy		19	/* Page is free, on buddy lists */
>  #define PG_booked		20	/* Has blocks reserved on-disk */
>  
> -#define PG_lazyfree		20	/* MADV_FREE potential throwaway */
> +#define PG_lazyfree		21	/* MADV_FREE potential throwaway */
>  
>  /* PG_owner_priv_1 users should have descriptive aliases */
>  #define PG_checked		PG_owner_priv_1 /* Used by some filesystems */

That's an accident: PG_lazyfree got added but the out-of-tree ext4 patches
didn't get updated.

otoh, the intersection between pages which are PageBooked() and pages which
are PageLazyFree() should be zreo, so it'd be good to actually formalise
this reuse within the ext4 patches.

otoh2, PageLazyFree() could have reused PG_owner_priv_1.

Rik, Ted: any thoughts?  We do need to scrimp on page flags: when we
finally run out, we're screwed.

--
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] 6+ messages in thread

* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
       [not found]   ` <20070514075519.GA6255@mail.ustc.edu.cn>
@ 2007-05-14  7:55     ` Fengguang Wu
  2007-05-14  7:55     ` Fengguang Wu
  1 sibling, 0 replies; 6+ messages in thread
From: Fengguang Wu @ 2007-05-14  7:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-mm, Rik van Riel, Theodore Ts'o, linux-ext4

On Sun, May 13, 2007 at 10:46:30PM -0700, Andrew Morton wrote:
> On Mon, 14 May 2007 10:37:18 +0800 Fengguang Wu <fengguang.wu@gmail.com> wrote:
> 
> > PG_lazyfree and PG_booked shares the same bit.
> > 
> > Either it is a bug that shall fixed by the following patch, or
> > the situation should be explicitly documented?
> > 
> > Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
> > ---
> >  include/linux/page-flags.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- linux-2.6.21-mm2.orig/include/linux/page-flags.h
> > +++ linux-2.6.21-mm2/include/linux/page-flags.h
> > @@ -91,7 +91,7 @@
> >  #define PG_buddy		19	/* Page is free, on buddy lists */
> >  #define PG_booked		20	/* Has blocks reserved on-disk */
> >  
> > -#define PG_lazyfree		20	/* MADV_FREE potential throwaway */
> > +#define PG_lazyfree		21	/* MADV_FREE potential throwaway */
> >  
> >  /* PG_owner_priv_1 users should have descriptive aliases */
> >  #define PG_checked		PG_owner_priv_1 /* Used by some filesystems */
> 
> That's an accident: PG_lazyfree got added but the out-of-tree ext4 patches
> didn't get updated.
> 
> otoh, the intersection between pages which are PageBooked() and pages which
> are PageLazyFree() should be zreo, so it'd be good to actually formalise
> this reuse within the ext4 patches.
> 
> otoh2, PageLazyFree() could have reused PG_owner_priv_1.

otoh3: PG_lazyfree and PG_readahead can reuse the same bit, too.
PG_lazyfree applies to anonymous pages, while PG_readahead applies to
file backed pages.

--
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] 6+ messages in thread

* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
       [not found]   ` <20070514075519.GA6255@mail.ustc.edu.cn>
  2007-05-14  7:55     ` Fengguang Wu
@ 2007-05-14  7:55     ` Fengguang Wu
  1 sibling, 0 replies; 6+ messages in thread
From: Fengguang Wu @ 2007-05-14  7:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, linux-mm, Rik van Riel, Theodore Ts'o, linux-ext4

On Sun, May 13, 2007 at 10:46:30PM -0700, Andrew Morton wrote:
> On Mon, 14 May 2007 10:37:18 +0800 Fengguang Wu <fengguang.wu@gmail.com> wrote:
> 
> > PG_lazyfree and PG_booked shares the same bit.
> > 
> > Either it is a bug that shall fixed by the following patch, or
> > the situation should be explicitly documented?
> > 
> > Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
> > ---
> >  include/linux/page-flags.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- linux-2.6.21-mm2.orig/include/linux/page-flags.h
> > +++ linux-2.6.21-mm2/include/linux/page-flags.h
> > @@ -91,7 +91,7 @@
> >  #define PG_buddy		19	/* Page is free, on buddy lists */
> >  #define PG_booked		20	/* Has blocks reserved on-disk */
> >  
> > -#define PG_lazyfree		20	/* MADV_FREE potential throwaway */
> > +#define PG_lazyfree		21	/* MADV_FREE potential throwaway */
> >  
> >  /* PG_owner_priv_1 users should have descriptive aliases */
> >  #define PG_checked		PG_owner_priv_1 /* Used by some filesystems */
> 
> That's an accident: PG_lazyfree got added but the out-of-tree ext4 patches
> didn't get updated.
> 
> otoh, the intersection between pages which are PageBooked() and pages which
> are PageLazyFree() should be zreo, so it'd be good to actually formalise
> this reuse within the ext4 patches.
> 
> otoh2, PageLazyFree() could have reused PG_owner_priv_1.

otoh3: PG_lazyfree and PG_readahead can reuse the same bit, too.
PG_lazyfree applies to anonymous pages, while PG_readahead applies to
file backed pages.

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

* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
  2007-05-14  5:46 ` [PATCH] resolve duplicate flag no for PG_lazyfree Andrew Morton
       [not found]   ` <20070514075519.GA6255@mail.ustc.edu.cn>
@ 2007-05-14 18:06   ` Theodore Tso
  2007-05-14 20:46     ` Andrew Morton
  1 sibling, 1 reply; 6+ messages in thread
From: Theodore Tso @ 2007-05-14 18:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Fengguang Wu, linux-kernel, linux-mm, Rik van Riel, linux-ext4

On Sun, May 13, 2007 at 10:46:30PM -0700, Andrew Morton wrote:
> otoh, the intersection between pages which are PageBooked() and pages which
> are PageLazyFree() should be zreo, so it'd be good to actually formalise
> this reuse within the ext4 patches.
> 
> otoh2, PageLazyFree() could have reused PG_owner_priv_1.
> 
> Rik, Ted: any thoughts?  We do need to scrimp on page flags: when we
> finally run out, we're screwed.

It makes sense to me.  PG_lazyfree is currently only in -mm, right?  I
don't see it in my git tree.  It would probably would be a good idea
to make sure that we check to add some sanity checking code if it
isn't there already that PG_lazyfree isn't already set when try to set
PG_lazyfree (just in case there is a bug in the future which causes
the should-never-happen case of trying lazy free a PageBooked page).

						- Ted

--
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] 6+ messages in thread

* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
  2007-05-14 18:06   ` Theodore Tso
@ 2007-05-14 20:46     ` Andrew Morton
  2007-05-16  0:28       ` Nick Piggin
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-05-14 20:46 UTC (permalink / raw)
  To: Theodore Tso
  Cc: Fengguang Wu, linux-kernel, linux-mm, Rik van Riel, linux-ext4,
	Nick Piggin

On Mon, 14 May 2007 14:06:19 -0400
Theodore Tso <tytso@mit.edu> wrote:

> On Sun, May 13, 2007 at 10:46:30PM -0700, Andrew Morton wrote:
> > otoh, the intersection between pages which are PageBooked() and pages which
> > are PageLazyFree() should be zreo, so it'd be good to actually formalise
> > this reuse within the ext4 patches.
> > 
> > otoh2, PageLazyFree() could have reused PG_owner_priv_1.
> > 
> > Rik, Ted: any thoughts?  We do need to scrimp on page flags: when we
> > finally run out, we're screwed.
> 
> It makes sense to me.  PG_lazyfree is currently only in -mm, right?

Ah, yes, I got confused, sorry.

>  I
> don't see it in my git tree.  It would probably would be a good idea
> to make sure that we check to add some sanity checking code if it
> isn't there already that PG_lazyfree isn't already set when try to set
> PG_lazyfree (just in case there is a bug in the future which causes
> the should-never-happen case of trying lazy free a PageBooked page).
> 

Actually, I think the current status of
lazy-freeing-of-memory-through-madv_free.patch is "might not be needed".  I
_think_ we've determined that 0a27a14a62921b438bb6f33772690d345a089be6
sufficiently fixed the perfomance problems we had in there?

--
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] 6+ messages in thread

* Re: [PATCH] resolve duplicate flag no for PG_lazyfree
  2007-05-14 20:46     ` Andrew Morton
@ 2007-05-16  0:28       ` Nick Piggin
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Piggin @ 2007-05-16  0:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Theodore Tso, Fengguang Wu, linux-kernel, linux-mm, Rik van Riel,
	linux-ext4

Andrew Morton wrote:
> On Mon, 14 May 2007 14:06:19 -0400
> Theodore Tso <tytso@mit.edu> wrote:
> 
> 
>>On Sun, May 13, 2007 at 10:46:30PM -0700, Andrew Morton wrote:
>>
>>>otoh, the intersection between pages which are PageBooked() and pages which
>>>are PageLazyFree() should be zreo, so it'd be good to actually formalise
>>>this reuse within the ext4 patches.
>>>
>>>otoh2, PageLazyFree() could have reused PG_owner_priv_1.
>>>
>>>Rik, Ted: any thoughts?  We do need to scrimp on page flags: when we
>>>finally run out, we're screwed.
>>
>>It makes sense to me.  PG_lazyfree is currently only in -mm, right?
> 
> 
> Ah, yes, I got confused, sorry.
> 
> 
>> I
>>don't see it in my git tree.  It would probably would be a good idea
>>to make sure that we check to add some sanity checking code if it
>>isn't there already that PG_lazyfree isn't already set when try to set
>>PG_lazyfree (just in case there is a bug in the future which causes
>>the should-never-happen case of trying lazy free a PageBooked page).
>>
> 
> 
> Actually, I think the current status of
> lazy-freeing-of-memory-through-madv_free.patch is "might not be needed".  I
> _think_ we've determined that 0a27a14a62921b438bb6f33772690d345a089be6
> sufficiently fixed the perfomance problems we had in there?

I think so far we've found that it fixes the MySQL scalability problem,
yes. I couldn't see any statistically significant difference with MySQL
in my tests with MADV_FREE (versus MADV_DONTNEED).

ebizzy is improved a bit at low concurrency but drops off slightly at
higher concurrency.

But basically, I don't think we've found a good reason to use a page
flag and introduce the potential performance regressions that the
MADV_FREE patch has.

-- 
SUSE Labs, Novell Inc.

--
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] 6+ messages in thread

end of thread, other threads:[~2007-05-16  0:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <379110250.28666@ustc.edu.cn>
2007-05-14  5:46 ` [PATCH] resolve duplicate flag no for PG_lazyfree Andrew Morton
     [not found]   ` <20070514075519.GA6255@mail.ustc.edu.cn>
2007-05-14  7:55     ` Fengguang Wu
2007-05-14  7:55     ` Fengguang Wu
2007-05-14 18:06   ` Theodore Tso
2007-05-14 20:46     ` Andrew Morton
2007-05-16  0:28       ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox