Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-28 Thread Ethan Solomita
Nick Piggin wrote: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss limit only because I got lucky and happened to share a lot of pages

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-28 Thread Ethan Solomita
Nick Piggin wrote: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss limit only because I got lucky and happened to share a lot of pages

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Balbir Singh
Nick Piggin wrote: Kirill Korotaev wrote: The approaches I have seen that don't have a struct page pointer, do intrusive things like try to put hooks everywhere throughout the kernel where a userspace task can cause an allocation (and of course end up missing many, so they aren't secure

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Nick Piggin
Kirill Korotaev wrote: The approaches I have seen that don't have a struct page pointer, do intrusive things like try to put hooks everywhere throughout the kernel where a userspace task can cause an allocation (and of course end up missing many, so they aren't secure anyway)... and basically

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Kirill Korotaev
Nick, >>Accounting becomes easy if we have a container pointer in struct page. >> This can form base ground for building controllers since any memory >>related controller would be interested in tracking pages. However we >>still want to evaluate if we can build them without bloating the >>struct

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Pavel Emelianov
Cedric Le Goater wrote: >> --- linux-2.6.20.orig/mm/migrate.c 2007-02-04 21:44:54.0 +0300 >> +++ linux-2.6.20-0/mm/migrate.c 2007-03-06 13:33:28.0 +0300 >> @@ -134,6 +134,7 @@ static void remove_migration_pte(struct >> pte_t *ptep, pte; >> spinlock_t *ptl; >>

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Cedric Le Goater
> --- linux-2.6.20.orig/mm/migrate.c2007-02-04 21:44:54.0 +0300 > +++ linux-2.6.20-0/mm/migrate.c 2007-03-06 13:33:28.0 +0300 > @@ -134,6 +134,7 @@ static void remove_migration_pte(struct > pte_t *ptep, pte; > spinlock_t *ptl; > unsigned long addr =

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Vaidyanathan Srinivasan
Nick Piggin wrote: > Vaidyanathan Srinivasan wrote: > >> Accounting becomes easy if we have a container pointer in struct page. >> This can form base ground for building controllers since any memory >> related controller would be interested in tracking pages. However we >> still want to

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Nick Piggin
Vaidyanathan Srinivasan wrote: Accounting becomes easy if we have a container pointer in struct page. This can form base ground for building controllers since any memory related controller would be interested in tracking pages. However we still want to evaluate if we can build them without

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Vaidyanathan Srinivasan
Balbir Singh wrote: > Nick Piggin wrote: >> Balbir Singh wrote: >>> Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Balbir Singh
Nick Piggin wrote: Balbir Singh wrote: Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside their maximum rss limit. When that does

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Balbir Singh
Nick Piggin wrote: Balbir Singh wrote: Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside their maximum rss limit. When that does

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Vaidyanathan Srinivasan
Balbir Singh wrote: Nick Piggin wrote: Balbir Singh wrote: Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside their maximum rss

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Nick Piggin
Vaidyanathan Srinivasan wrote: Accounting becomes easy if we have a container pointer in struct page. This can form base ground for building controllers since any memory related controller would be interested in tracking pages. However we still want to evaluate if we can build them without

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Vaidyanathan Srinivasan
Nick Piggin wrote: Vaidyanathan Srinivasan wrote: Accounting becomes easy if we have a container pointer in struct page. This can form base ground for building controllers since any memory related controller would be interested in tracking pages. However we still want to evaluate if we

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Kirill Korotaev
Nick, Accounting becomes easy if we have a container pointer in struct page. This can form base ground for building controllers since any memory related controller would be interested in tracking pages. However we still want to evaluate if we can build them without bloating the struct page.

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Cedric Le Goater
--- linux-2.6.20.orig/mm/migrate.c2007-02-04 21:44:54.0 +0300 +++ linux-2.6.20-0/mm/migrate.c 2007-03-06 13:33:28.0 +0300 @@ -134,6 +134,7 @@ static void remove_migration_pte(struct pte_t *ptep, pte; spinlock_t *ptl; unsigned long addr =

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Pavel Emelianov
Cedric Le Goater wrote: --- linux-2.6.20.orig/mm/migrate.c 2007-02-04 21:44:54.0 +0300 +++ linux-2.6.20-0/mm/migrate.c 2007-03-06 13:33:28.0 +0300 @@ -134,6 +134,7 @@ static void remove_migration_pte(struct pte_t *ptep, pte; spinlock_t *ptl; unsigned

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Nick Piggin
Kirill Korotaev wrote: The approaches I have seen that don't have a struct page pointer, do intrusive things like try to put hooks everywhere throughout the kernel where a userspace task can cause an allocation (and of course end up missing many, so they aren't secure anyway)... and basically

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-14 Thread Balbir Singh
Nick Piggin wrote: Kirill Korotaev wrote: The approaches I have seen that don't have a struct page pointer, do intrusive things like try to put hooks everywhere throughout the kernel where a userspace task can cause an allocation (and of course end up missing many, so they aren't secure

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Balbir Singh wrote: Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside their maximum rss limit. When that does happen and if a

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Balbir Singh
Nick Piggin wrote: Eric W. Biederman wrote: Nick Piggin <[EMAIL PROTECTED]> writes: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin <[EMAIL PROTECTED]> writes: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss limit only because

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Nick Piggin <[EMAIL PROTECTED]> writes: > Eric W. Biederman wrote: >> >> First touch page ownership does not guarantee give me anything useful >> for knowing if I can run my application or not. Because of page >> sharing my application might run inside the rss limit only because >> I got lucky

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Eric W. Biederman wrote: Herbert Poetzl <[EMAIL PROTECTED]> writes: On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page->_mapcount counter, otherwise you can't detect

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Herbert Poetzl <[EMAIL PROTECTED]> writes: > On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: >> On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: >> > >> > For these you essentially need per-container page->_mapcount counter, >> > otherwise you can't detect whether rss group

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Dave Hansen <[EMAIL PROTECTED]> writes: > On Mon, 2007-03-12 at 20:07 +0300, Kirill Korotaev wrote: >> > On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: >> >>For these you essentially need per-container page->_mapcount counter, >> >>otherwise you can't detect whether rss group still has

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Dave Hansen [EMAIL PROTECTED] writes: On Mon, 2007-03-12 at 20:07 +0300, Kirill Korotaev wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the page in

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Herbert Poetzl [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Eric W. Biederman wrote: Herbert Poetzl [EMAIL PROTECTED] writes: On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Eric W. Biederman
Nick Piggin [EMAIL PROTECTED] writes: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss limit only because I got lucky and happened

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin [EMAIL PROTECTED] writes: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss limit only because I

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Balbir Singh
Nick Piggin wrote: Eric W. Biederman wrote: Nick Piggin [EMAIL PROTECTED] writes: Eric W. Biederman wrote: First touch page ownership does not guarantee give me anything useful for knowing if I can run my application or not. Because of page sharing my application might run inside the rss

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-13 Thread Nick Piggin
Balbir Singh wrote: Nick Piggin wrote: And strangely, this example does not go outside the parameters of what you asked for AFAIKS. In the worst case of one container getting _all_ the shared pages, they will still remain inside their maximum rss limit. When that does happen and if a

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Herbert Poetzl
On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: > On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: > > > > For these you essentially need per-container page->_mapcount counter, > > otherwise you can't detect whether rss group still has the page > > in question being mapped

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Dave Hansen
On Mon, 2007-03-12 at 20:07 +0300, Kirill Korotaev wrote: > > On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: > >>For these you essentially need per-container page->_mapcount counter, > >>otherwise you can't detect whether rss group still has the page in question > >>being mapped > >>in

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Kirill Korotaev
> On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: > >>For these you essentially need per-container page->_mapcount counter, >>otherwise you can't detect whether rss group still has the page in question >>being mapped >>in its processes' address spaces or not. > > > What do you mean

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Dave Hansen
On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: > > For these you essentially need per-container page->_mapcount counter, > otherwise you can't detect whether rss group still has the page in question > being mapped > in its processes' address spaces or not. What do you mean by this?

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Kirill Korotaev
Eric W. Biederman wrote: > Pavel Emelianov <[EMAIL PROTECTED]> writes: > > >>Pages are charged to their first touchers which are >>determined using pages' mapcount manipulations in >>rmap calls. > > > NAK pages should be charged to every rss group whose mm_struct they > are mapped into. For

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Kirill Korotaev
Eric W. Biederman wrote: Pavel Emelianov [EMAIL PROTECTED] writes: Pages are charged to their first touchers which are determined using pages' mapcount manipulations in rmap calls. NAK pages should be charged to every rss group whose mm_struct they are mapped into. For these you

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Dave Hansen
On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the page in question being mapped in its processes' address spaces or not. What do you mean by this? You

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Kirill Korotaev
On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the page in question being mapped in its processes' address spaces or not. What do you mean by this? You

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Dave Hansen
On Mon, 2007-03-12 at 20:07 +0300, Kirill Korotaev wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the page in question being mapped in its processes'

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-12 Thread Herbert Poetzl
On Mon, Mar 12, 2007 at 09:50:08AM -0700, Dave Hansen wrote: On Mon, 2007-03-12 at 19:23 +0300, Kirill Korotaev wrote: For these you essentially need per-container page-_mapcount counter, otherwise you can't detect whether rss group still has the page in question being mapped in its

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-11 Thread Eric W. Biederman
Pavel Emelianov <[EMAIL PROTECTED]> writes: > Pages are charged to their first touchers which are > determined using pages' mapcount manipulations in > rmap calls. NAK pages should be charged to every rss group whose mm_struct they are mapped into. Eric - To unsubscribe from this list: send the

Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-11 Thread Eric W. Biederman
Pavel Emelianov [EMAIL PROTECTED] writes: Pages are charged to their first touchers which are determined using pages' mapcount manipulations in rmap calls. NAK pages should be charged to every rss group whose mm_struct they are mapped into. Eric - To unsubscribe from this list: send the line