Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Balbir Singh
Hugh Dickins wrote: > On Thu, 20 Dec 2007, Andrew Morton wrote: >> On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: >>> I was going to say the same thing, page_get_page_cgroup() does not hold >>> any references. May be _get_ in the name is confusing. >> It is a bit

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Thu, 20 Dec 2007, Andrew Morton wrote: > On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: > > I was going to say the same thing, page_get_page_cgroup() does not hold > > any references. May be _get_ in the name is confusing. > > It is a bit unconventional.

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Andrew Morton
On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh <[EMAIL PROTECTED]> wrote: > >> struct page_cgroup *page_get_page_cgroup(struct page *page) > >> { > >>return (struct page_cgroup *) > >>(page->page_cgroup & ~PAGE_CGROUP_LOCK); > >> } > >> > >> I guess the issue is that often a

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Dave Hansen
On Thu, 2007-12-20 at 21:54 +0530, Balbir Singh wrote: > > I was going to say the same thing, page_get_page_cgroup() does not hold > any references. May be _get_ in the name is confusing. OK, you three had the entire conversation outing me before I even fot to respond! :) Yeah, I thought it

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Balbir Singh
Peter Zijlstra wrote: > On Thu, 2007-12-20 at 14:16 +, Hugh Dickins wrote: >> On Thu, 20 Dec 2007, Peter Zijlstra wrote: >>> On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: On Wed, 19 Dec 2007, Dave Hansen wrote: >> - page_assign_page_cgroup(page, NULL); >> +

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Peter Zijlstra
On Thu, 2007-12-20 at 14:16 +, Hugh Dickins wrote: > On Thu, 20 Dec 2007, Peter Zijlstra wrote: > > On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: > > > On Wed, 19 Dec 2007, Dave Hansen wrote: > > > > > - page_assign_page_cgroup(page, NULL); > > > > > +

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Thu, 20 Dec 2007, Peter Zijlstra wrote: > On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: > > On Wed, 19 Dec 2007, Dave Hansen wrote: > > > > - page_assign_page_cgroup(page, NULL); > > > > + VM_BUG_ON(page_get_page_cgroup(page)); > > > > > > Hi Balbir, > > > > > > You

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Peter Zijlstra
On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: > On Wed, 19 Dec 2007, Dave Hansen wrote: > > > --- > > > linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page > > > 2007-12-19 11:31:46.0 +0530 > > > +++

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Wed, 19 Dec 2007, Dave Hansen wrote: > > --- > > linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page > > 2007-12-19 11:31:46.0 +0530 > > +++ linux-2.6.24-rc5-balbir/mm/page_alloc.c 2007-12-19 > > 11:33:45.0 +0530 > > @@ -995,7

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Wed, 19 Dec 2007, Dave Hansen wrote: --- linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page 2007-12-19 11:31:46.0 +0530 +++ linux-2.6.24-rc5-balbir/mm/page_alloc.c 2007-12-19 11:33:45.0 +0530 @@ -995,7 +995,7 @@ static

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Peter Zijlstra
On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: On Wed, 19 Dec 2007, Dave Hansen wrote: --- linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page 2007-12-19 11:31:46.0 +0530 +++ linux-2.6.24-rc5-balbir/mm/page_alloc.c

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Thu, 20 Dec 2007, Peter Zijlstra wrote: On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: On Wed, 19 Dec 2007, Dave Hansen wrote: - page_assign_page_cgroup(page, NULL); + VM_BUG_ON(page_get_page_cgroup(page)); Hi Balbir, You generally want to do these

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Peter Zijlstra
On Thu, 2007-12-20 at 14:16 +, Hugh Dickins wrote: On Thu, 20 Dec 2007, Peter Zijlstra wrote: On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: On Wed, 19 Dec 2007, Dave Hansen wrote: - page_assign_page_cgroup(page, NULL); +

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Balbir Singh
Peter Zijlstra wrote: On Thu, 2007-12-20 at 14:16 +, Hugh Dickins wrote: On Thu, 20 Dec 2007, Peter Zijlstra wrote: On Thu, 2007-12-20 at 13:14 +, Hugh Dickins wrote: On Wed, 19 Dec 2007, Dave Hansen wrote: - page_assign_page_cgroup(page, NULL); +

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Dave Hansen
On Thu, 2007-12-20 at 21:54 +0530, Balbir Singh wrote: I was going to say the same thing, page_get_page_cgroup() does not hold any references. May be _get_ in the name is confusing. OK, you three had the entire conversation outing me before I even fot to respond! :) Yeah, I thought it was a

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Andrew Morton
On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh [EMAIL PROTECTED] wrote: struct page_cgroup *page_get_page_cgroup(struct page *page) { return (struct page_cgroup *) (page-page_cgroup ~PAGE_CGROUP_LOCK); } I guess the issue is that often a get function has a

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Hugh Dickins
On Thu, 20 Dec 2007, Andrew Morton wrote: On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh [EMAIL PROTECTED] wrote: I was going to say the same thing, page_get_page_cgroup() does not hold any references. May be _get_ in the name is confusing. It is a bit unconventional. page_cgroup()?

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-20 Thread Balbir Singh
Hugh Dickins wrote: On Thu, 20 Dec 2007, Andrew Morton wrote: On Thu, 20 Dec 2007 21:54:15 +0530 Balbir Singh [EMAIL PROTECTED] wrote: I was going to say the same thing, page_get_page_cgroup() does not hold any references. May be _get_ in the name is confusing. It is a bit unconventional.

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-19 Thread Dave Hansen
On Wed, 2007-12-19 at 11:48 +0530, Balbir Singh wrote: > diff -puN > mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page > mm/page_alloc.c > --- > linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page > 2007-12-19 11:31:46.0

Re: [PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-19 Thread Dave Hansen
On Wed, 2007-12-19 at 11:48 +0530, Balbir Singh wrote: diff -puN mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page mm/page_alloc.c --- linux-2.6.24-rc5/mm/page_alloc.c~memory-controller-move-to-bug-on-in-free_hot_cold_page 2007-12-19 11:31:46.0 +0530 +++

[PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-18 Thread Balbir Singh
Based on the recommendation and observations of Hugh Dickins, page_cgroup_assign_cgroup() is not required. This patch replaces it with a VM_BUG_ON, so that we can catch them in free_hot_cold_page() Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- mm/page_alloc.c |2 +- 1 file changed,

[PATCH] Move page_assign_page_cgroup to VM_BUG_ON in free_hot_cold_page

2007-12-18 Thread Balbir Singh
Based on the recommendation and observations of Hugh Dickins, page_cgroup_assign_cgroup() is not required. This patch replaces it with a VM_BUG_ON, so that we can catch them in free_hot_cold_page() Signed-off-by: Balbir Singh [EMAIL PROTECTED] --- mm/page_alloc.c |2 +- 1 file changed, 1