From: Jeff Davis <linux@j-davis.com>
To: balbir@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] badness() dramatically overcounts memory
Date: Tue, 05 Feb 2008 15:02:41 -0800 [thread overview]
Message-ID: <1202252561.24634.64.camel@dogma.ljc.laika.com> (raw)
In-Reply-To: <47A7E282.1080902@linux.vnet.ibm.com>
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 be to high to enable vm_stat_account when
CONFIG_PROC_FS is not defined?
Or perhaps my patch would only have an effect when CONFIG_PROC_FS is set
(which is default)?
> 2. How have you tested these patches? One way to do it would be to use the
> memory controller and set a small limit on the control group. A memory
> intensive application will soon see an OOM.
I have done a quick test a while back when I first wrote the patch. I
will test more thoroughly now.
> 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, because killing a
process doesn't free the shared memory.
Regards,
Jeff Davis
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-02-05 23:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 3:34 Jeff Davis
2008-02-05 4:13 ` Balbir Singh
2008-02-05 23:02 ` Jeff Davis [this message]
2008-02-05 23:09 ` David Rientjes
2008-02-06 1:54 ` KOSAKI Motohiro
2008-02-06 2:05 ` David Rientjes
2008-02-06 4:00 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202252561.24634.64.camel@dogma.ljc.laika.com \
--to=linux@j-davis.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox