[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1403041400020.5421@chino.kir.corp.google.com>
Date: Tue, 4 Mar 2014 14:05:42 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: "He, Bo" <bo.he@...el.com>
cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
"hannes@...xchg.org" <hannes@...xchg.org>,
"oleg@...hat.com" <oleg@...hat.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"Zhang, Yanmin" <yanmin.zhang@...el.com>,
"yanmin_zhang@...el.linux.com" <yanmin_zhang@...el.linux.com>,
"Wang, Biao" <biao.wang@...el.com>
Subject: RE: [PATCH] mm, oom: normalize the adj to ensure oom_badness return
a positive number
On Tue, 4 Mar 2014, He, Bo wrote:
> Sorry, the title is confusing. Change it to: mm, oom: normalize the adj to ensure oom_badness returns a positive number
There's something seriously wrong with your email client, it's not
replying correctly to threads so this appears as a completely new thread.
Meanwhile, your patch was completely whitespace damaged. Please read
Documentation/email-clients.txt.
> We are enabling android mobiles. When running stress memory test, there is a bad issue. Some critical processes such as Healthd and watchdogd are killed, while some other processes are still alive.
> OOM should kill the tasks whose oom_score are biggest. Many processes use a minus oom_score_adj. oom_badness returns 1 for all of them and their oom_score are all 0.
>
No, you're confusing two different things. A negative
/proc/pid/oom_score_adj discounts a process's memory usage in comparison
to other processes. If this value discounts all memory usage for every
process, then your setting of /proc/pid/oom_score_adj is wrong.
oom_badness() returns 1 so that the oom killer may still kill these
processes, the /proc/pid/oom_score is irrelevant to this (and the only
reason it appears as 0 is because it already normalizes by multiplying by
1000 / totalpages).
> The patch tries to convert the minus oom_score_adj to a positive number when calculating oom_score. oom_score can keep right process priority sequence.
>
Nack, this patch is completely disregarding the value specified by the
user for /proc/pid/oom_score_adj. Your userspace should be using
/proc/pid/oom_score_adj, not /proc/pid/oom_adj.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists