Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-08 Thread Alan Cox
> When $VERY_CRITICAL_DAEMON dies *all* the users blame the sysadmin [me]. If a > user application dies because a malloc() returns NULL, the sysadmin [I] can > blame the user saying: "hey! _you_ tried to hog the machine and _your_ > application is not able to handle the NULL result of the malloc()s

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread Andrea Righi
Alan Cox wrote: >> - allow uid=1001 and uid=1002 (common users) to allocate memory only if the >> total committed space is below the 50% of the physical RAM + the size of >> swap: >> [EMAIL PROTECTED] # echo 1001:2:50 > /proc/overcommit_uid >> [EMAIL PROTECTED] # echo 1002:2:50 > /proc/overcomm

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread Andrea Righi
William Lee Irwin III wrote: > On Mon, May 07, 2007 at 12:16:58PM -0700, William Lee Irwin III wrote: >> The following stanza occurs often: >> + if (!vm_acct_get_config(&v, current->uid)) { >> + overcommit_memory = v.overcommit_memory; >> + overcommit_ratio = v.ove

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread Alan Cox
> - allow uid=1001 and uid=1002 (common users) to allocate memory only if the > total committed space is below the 50% of the physical RAM + the size of > swap: > [EMAIL PROTECTED] # echo 1001:2:50 > /proc/overcommit_uid > [EMAIL PROTECTED] # echo 1002:2:50 > /proc/overcommit_uid There are som

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread William Lee Irwin III
On Mon, May 07, 2007 at 12:16:58PM -0700, William Lee Irwin III wrote: > The following stanza occurs often: > + if (!vm_acct_get_config(&v, current->uid)) { > + overcommit_memory = v.overcommit_memory; > + overcommit_ratio = v.overcommit_ratio; > + } else { >

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread Luca Tettamanti
Hi, a few comments on the patch: Andrea Righi <[EMAIL PROTECTED]> ha scritto: > diff -urpN linux-2.6.21/include/linux/mman.h > linux-2.6.21-vm-acct-user/include/linux/mman.h > --- linux-2.6.21/include/linux/mman.h 2007-05-07 20:20:24.0 +0200 > +++ linux-2.6.21-vm-acct-user/include/linux

Re: [RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread William Lee Irwin III
On Mon, May 07, 2007 at 08:56:39PM +0200, Andrea Righi wrote: > Allow to define per-UID virtual memory overcommit handling. Configuration is > stored in a hash list in kernel space reachable through /proc/overcommit_uid > (surely there're better ways to do it, i.e. via configfs). > Hash elements ar

[RFC][PATCH] VM: per-user overcommit policy

2007-05-07 Thread Andrea Righi
Allow to define per-UID virtual memory overcommit handling. Configuration is stored in a hash list in kernel space reachable through /proc/overcommit_uid (surely there're better ways to do it, i.e. via configfs). Hash elements are defined using a triple: uid:overcommit_memory:overcommit_ratio Th