Re: [RFC] some page can't be migrated

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Andrew Morton wrote: > > > > - if (!page->mapping) > > + if (!page->mapping) { > > + if (!PageAnon(page) && PagePrivate(page)) > > + try_to_release_page(page, GFP_KERNEL); > > goto rcu_unlock; > > + } > > We call

Re: [RFC] some page can't be migrated

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Andrew Morton wrote: > We call something(GFP_KERNEL) under rcu_read_lock()? I've lost track of > the myriad flavours of rcu which we purport to support, but I don't think > they'll all like us blocking under rcu_read_lock(). > > We _won't_ block, because

Re: [RFC] some page can't be migrated

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Andrew Morton wrote: We call something(GFP_KERNEL) under rcu_read_lock()? I've lost track of the myriad flavours of rcu which we purport to support, but I don't think they'll all like us blocking under rcu_read_lock(). We _won't_ block, because try_to_release_page()

Re: [RFC] some page can't be migrated

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Andrew Morton wrote: - if (!page-mapping) + if (!page-mapping) { + if (!PageAnon(page) PagePrivate(page)) + try_to_release_page(page, GFP_KERNEL); goto rcu_unlock; + } We call something(GFP_KERNEL) under

Re: [RFC] some page can't be migrated

2008-01-27 Thread Shaohua Li
On Mon, 2008-01-28 at 12:43 +1100, Nick Piggin wrote: > On Sunday 27 January 2008 17:03, Andrew Morton wrote: > > > On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li <[EMAIL PROTECTED]> > > > wrote: > > > > > > - if (!page->mapping) > > > + if (!page->mapping) { > > > + if (!PageAnon(page) &&

Re: [RFC] some page can't be migrated

2008-01-27 Thread Nick Piggin
On Sunday 27 January 2008 17:03, Andrew Morton wrote: > > On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li <[EMAIL PROTECTED]> > > wrote: > > > > - if (!page->mapping) > > + if (!page->mapping) { > > + if (!PageAnon(page) && PagePrivate(page)) > > +

Re: [RFC] some page can't be migrated

2008-01-27 Thread Shaohua Li
On Mon, 2008-01-28 at 12:43 +1100, Nick Piggin wrote: On Sunday 27 January 2008 17:03, Andrew Morton wrote: On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li [EMAIL PROTECTED] wrote: - if (!page-mapping) + if (!page-mapping) { + if (!PageAnon(page) PagePrivate(page)) +

Re: [RFC] some page can't be migrated

2008-01-26 Thread Andrew Morton
> On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li <[EMAIL PROTECTED]> wrote: > > - if (!page->mapping) > + if (!page->mapping) { > + if (!PageAnon(page) && PagePrivate(page)) > + try_to_release_page(page, GFP_KERNEL); > goto rcu_unlock; > +

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Fri, 2008-01-25 at 15:17 +1100, Nick Piggin wrote: > On Friday 25 January 2008 15:01, Christoph Lameter wrote: > > Acked-by: Christoph Lameter <[EMAIL PROTECTED]> > > > > Nick? Ok with you too? > > Yeah, for memory hot remove that makes sense. A comment > might be in order, at least a

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Friday 25 January 2008 14:09, Shaohua Li wrote: > On Fri, 2008-01-25 at 14:03 +1100, Nick Piggin wrote: > > On Wednesday 23 January 2008 17:22, Shaohua Li wrote: > > > Anonymous page might have fs-private metadata, the page is truncated. > > > As the page hasn't mapping, page migration refuse

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Nick Piggin wrote: > Yeah, for memory hot remove that makes sense. A comment > might be in order, at least a reference to the orphaned > page code in vmscan.c. Right. The surrounding comments in mm/migrate.c also need to be made consistent. The comment before is now

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Friday 25 January 2008 15:01, Christoph Lameter wrote: > Acked-by: Christoph Lameter <[EMAIL PROTECTED]> > > Nick? Ok with you too? Yeah, for memory hot remove that makes sense. A comment might be in order, at least a reference to the orphaned page code in vmscan.c. Otherwise, it is OK by me.

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
Acked-by: Christoph Lameter <[EMAIL PROTECTED]> Nick? Ok with you too? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Thu, 2008-01-24 at 19:37 -0800, Christoph Lameter wrote: > On Wed, 23 Jan 2008, Shaohua Li wrote: > > > + > > + /* > > +* See truncate_complete_page(). Anonymous page might have > > +* fs-private metadata, the page is truncated. Such page can't be > > +* migrated. Try to free

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Wed, 23 Jan 2008, Shaohua Li wrote: > + > + /* > + * See truncate_complete_page(). Anonymous page might have > + * fs-private metadata, the page is truncated. Such page can't be > + * migrated. Try to free metadata, so the page can be freed. > + */ Well maybe you

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Thu, 2008-01-24 at 19:12 -0800, Christoph Lameter wrote: > On Fri, 25 Jan 2008, Shaohua Li wrote: > > > the page is still in lru list. Memory hot remove will try to migrate the > > page. > > So this is an abandoned page with a refcount that only exists because of > fs private data? Yes,

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Shaohua Li wrote: > the page is still in lru list. Memory hot remove will try to migrate the > page. So this is an abandoned page with a refcount that only exists because of fs private data? Truncate race? -- To unsubscribe from this list: send the line "unsubscribe

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Nick Piggin wrote: > On Wednesday 23 January 2008 17:22, Shaohua Li wrote: > > Anonymous page might have fs-private metadata, the page is truncated. As > > the page hasn't mapping, page migration refuse to migrate the page. It > > appears the page is only freed in page

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Fri, 2008-01-25 at 14:03 +1100, Nick Piggin wrote: > On Wednesday 23 January 2008 17:22, Shaohua Li wrote: > > Anonymous page might have fs-private metadata, the page is truncated. As > > the page hasn't mapping, page migration refuse to migrate the page. It > > appears the page is only freed

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Wednesday 23 January 2008 17:22, Shaohua Li wrote: > Anonymous page might have fs-private metadata, the page is truncated. As > the page hasn't mapping, page migration refuse to migrate the page. It > appears the page is only freed in page reclaim and if zone watermark is > low, the page is

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Shaohua Li wrote: the page is still in lru list. Memory hot remove will try to migrate the page. So this is an abandoned page with a refcount that only exists because of fs private data? Truncate race? -- To unsubscribe from this list: send the line unsubscribe

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Nick Piggin wrote: On Wednesday 23 January 2008 17:22, Shaohua Li wrote: Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate the page. It appears the page is only freed in page reclaim and

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Fri, 2008-01-25 at 14:03 +1100, Nick Piggin wrote: On Wednesday 23 January 2008 17:22, Shaohua Li wrote: Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate the page. It appears the page is only freed in page

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Wed, 23 Jan 2008, Shaohua Li wrote: + + /* + * See truncate_complete_page(). Anonymous page might have + * fs-private metadata, the page is truncated. Such page can't be + * migrated. Try to free metadata, so the page can be freed. + */ Well maybe you should

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Wednesday 23 January 2008 17:22, Shaohua Li wrote: Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate the page. It appears the page is only freed in page reclaim and if zone watermark is low, the page is never

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Thu, 2008-01-24 at 19:12 -0800, Christoph Lameter wrote: On Fri, 25 Jan 2008, Shaohua Li wrote: the page is still in lru list. Memory hot remove will try to migrate the page. So this is an abandoned page with a refcount that only exists because of fs private data? Yes, this is what

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Thu, 2008-01-24 at 19:37 -0800, Christoph Lameter wrote: On Wed, 23 Jan 2008, Shaohua Li wrote: + + /* +* See truncate_complete_page(). Anonymous page might have +* fs-private metadata, the page is truncated. Such page can't be +* migrated. Try to free metadata, so

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
Acked-by: Christoph Lameter [EMAIL PROTECTED] Nick? Ok with you too? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Friday 25 January 2008 15:01, Christoph Lameter wrote: Acked-by: Christoph Lameter [EMAIL PROTECTED] Nick? Ok with you too? Yeah, for memory hot remove that makes sense. A comment might be in order, at least a reference to the orphaned page code in vmscan.c. Otherwise, it is OK by me.

Re: [RFC] some page can't be migrated

2008-01-24 Thread Christoph Lameter
On Fri, 25 Jan 2008, Nick Piggin wrote: Yeah, for memory hot remove that makes sense. A comment might be in order, at least a reference to the orphaned page code in vmscan.c. Right. The surrounding comments in mm/migrate.c also need to be made consistent. The comment before is now slightly

Re: [RFC] some page can't be migrated

2008-01-24 Thread Nick Piggin
On Friday 25 January 2008 14:09, Shaohua Li wrote: On Fri, 2008-01-25 at 14:03 +1100, Nick Piggin wrote: On Wednesday 23 January 2008 17:22, Shaohua Li wrote: Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate

Re: [RFC] some page can't be migrated

2008-01-24 Thread Shaohua Li
On Fri, 2008-01-25 at 15:17 +1100, Nick Piggin wrote: On Friday 25 January 2008 15:01, Christoph Lameter wrote: Acked-by: Christoph Lameter [EMAIL PROTECTED] Nick? Ok with you too? Yeah, for memory hot remove that makes sense. A comment might be in order, at least a reference to the

[RFC] some page can't be migrated

2008-01-22 Thread Shaohua Li
Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate the page. It appears the page is only freed in page reclaim and if zone watermark is low, the page is never freed, as a result migration always fail. I thought we

[RFC] some page can't be migrated

2008-01-22 Thread Shaohua Li
Anonymous page might have fs-private metadata, the page is truncated. As the page hasn't mapping, page migration refuse to migrate the page. It appears the page is only freed in page reclaim and if zone watermark is low, the page is never freed, as a result migration always fail. I thought we