Re: [PATCH] badness() dramatically overcounts memory

2008-02-05 Thread Balbir Singh
KOSAKI Motohiro wrote: > Hi > The interesting thing is the use of total_vm and not the RSS which is used as the basis by the OOM killer. I need to read/understand the code a bit more. >>> RSS makes more sense to me as well. >> Andrea Arcangeli has patches pending which change this

Re: [PATCH] badness() dramatically overcounts memory

2008-02-05 Thread David Rientjes
On Wed, 6 Feb 2008, KOSAKI Motohiro wrote: > > Andrea Arcangeli has patches pending which change this to the RSS. > > Specifically: > > > > http://marc.info/?l=linux-mm&m=119977937126925 > > I agreed with you that RSS is better :) > > > > but.. > on many node numa, per zone rss is more

Re: [PATCH] badness() dramatically overcounts memory

2008-02-05 Thread KOSAKI Motohiro
Hi > > > The interesting thing is the use of total_vm and not the RSS which is > > > used as > > > the basis by the OOM killer. I need to read/understand the code a bit > > > more. > > > > RSS makes more sense to me as well. > > Andrea Arcangeli has patches pending which change this to the RSS

Re: [PATCH] badness() dramatically overcounts memory

2008-02-05 Thread David Rientjes
On Tue, 5 Feb 2008, Jeff Davis wrote: > > The interesting thing is the use of total_vm and not the RSS which is used > > as > > the basis by the OOM killer. I need to read/understand the code a bit more. > > RSS makes more sense to me as well. > > To me, it makes no sense to count shared memory

Re: [PATCH] badness() dramatically overcounts memory

2008-02-05 Thread Jeff Davis
On Tue, 2008-02-05 at 09:43 +0530, Balbir Singh wrote: > 1. grep on the kernel source tells me that shared_vm is incremented only in >vm_stat_account(), which is a NO-OP if CONFIG_PROC_FS is not defined. I see, thanks for pointing that out. Is there another way do you think? Would the penalty

Re: [PATCH] badness() dramatically overcounts memory

2008-02-04 Thread Balbir Singh
Jeff Davis wrote: > In oom_kill.c, one of the badness calculations is wildly inaccurate. If > memory is shared among child processes, that same memory will be counted > for each child, effectively multiplying the memory penalty by N, where N > is the number of children. > > This makes it almost ce