From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: "Christoph Lameter" <cl@linux-foundation.org>
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
aarcange@redhat.com, akpm@linux-foundation.org,
minchan.kim@gmail.com, rientjes@google.com,
vedran.furac@gmail.com,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>
Subject: Re: [RFC][-mm][PATCH 1/6] oom-killer: updates for classification of OOM
Date: Tue, 3 Nov 2009 08:02:28 +0900 (JST) [thread overview]
Message-ID: <c33e080dcc375d55a4dee1a1314e73f0.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0911021159120.2028@V090114053VZO-1>
Thanks! your review is very helpful around NUMA.
Christoph Lameter wrote:
> On Mon, 2 Nov 2009, KAMEZAWA Hiroyuki wrote:
>
>> /*
>> - * Types of limitations to the nodes from which allocations may occur
>> + * Types of limitations to zones from which allocations may occur
>> */
>
> "Types of limitations that may cause OOMs"? MEMCG limitations are not zone
> based.
>
ah, will rewrite.
>> */
>>
>> -unsigned long badness(struct task_struct *p, unsigned long uptime)
>> +static unsigned long __badness(struct task_struct *p,
>> + unsigned long uptime, enum oom_constraint constraint,
>> + struct mem_cgroup *mem)
>> {
>> unsigned long points, cpu_time, run_time;
>> struct mm_struct *mm;
>
> Why rename this function? You are adding a global_badness anyways.
>
just because of history of my own updates...i.e. mistake.
no reason. sorry.
>
>> + /*
>> + * In numa environ, almost all allocation will be against NORMAL zone.
>
> The typical allocations will be against the policy_zone! SGI IA64 (and
> others) have policy_zone == GFP_DMA.
>
Hmm ? ok. I thought GPF_DMA for ia64 was below 4G zone.
If all memory are GFP_DMA(as ppc), that means no lowemem.
I'll just rewrite above comments as
"typical allocation will be against policy_zone".
>> + * But some small area, ex)GFP_DMA for ia64 or GFP_DMA32 for x86-64
>> + * can cause OOM. We can use policy_zone for checking lowmem.
>> + */
>
> Simply say that we are checking if the zone constraint is below the policy
> zone?
>
ok, will rewrite. Too verbose just bacause policy_zone isn't well unknown.
>> + * Now, only mempolicy specifies nodemask. But if nodemask
>> + * covers all nodes, this oom is global oom.
>> + */
>> + if (nodemask && !nodes_equal(node_states[N_HIGH_MEMORY], *nodemask))
>> + ret = CONSTRAINT_MEMORY_POLICY;
>
> Huh? A cpuset can also restrict the nodes?
>
cpuset doesn't pass nodemask for allocation(now).
It checks its nodemask in get_free_page_from_freelist(), internally.
>> + /*
>> + * If not __GFP_THISNODE, zonelist containes all nodes. And if
>
> Dont see any __GFP_THISNODE checks here.
>
If __GFP_THISNODE, zonelist includes local node only. Then zonelist/nodemask
check will hunt it and result will be CONSTRAINT_MEMPOLICY.
Then...hum....recommending CONSTRAINT_THISNODE ?
>> panic("out of memory from page fault. panic_on_oom is selected.\n");
>>
>> read_lock(&tasklist_lock);
>> - __out_of_memory(0, 0); /* unknown gfp_mask and order */
>> + /*
>> + * Considering nature of pages required for page-fault,this must be
>> + * global OOM (if not cpuset...). Then, CONSTRAINT_NONE is correct.
>> + * zonelist, nodemasks are unknown...
>> + */
>> + __out_of_memory(0, CONSTRAINT_NONE, 0, NULL);
>> read_unlock(&tasklist_lock);
>
> Page faults can occur on processes that have memory restrictions.
>
yes. comments are bad. will rewrite. But we don't have any useful
information here.Fixing pagefault_out_of_memory is on my to-do-list.
It seems wrong.
But a condition unclear to me is when VM_FAULT_OOM can be returned
without oom-kill...so plz give me time.
Thanks,
-Kame
WARNING: multiple messages have this Message-ID (diff)
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
aarcange@redhat.com, akpm@linux-foundation.org,
minchan.kim@gmail.com, rientjes@google.com,
vedran.furac@gmail.com,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>
Subject: Re: [RFC][-mm][PATCH 1/6] oom-killer: updates for classification of OOM
Date: Tue, 3 Nov 2009 08:02:28 +0900 (JST) [thread overview]
Message-ID: <c33e080dcc375d55a4dee1a1314e73f0.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0911021159120.2028@V090114053VZO-1>
Thanks! your review is very helpful around NUMA.
Christoph Lameter wrote:
> On Mon, 2 Nov 2009, KAMEZAWA Hiroyuki wrote:
>
>> /*
>> - * Types of limitations to the nodes from which allocations may occur
>> + * Types of limitations to zones from which allocations may occur
>> */
>
> "Types of limitations that may cause OOMs"? MEMCG limitations are not zone
> based.
>
ah, will rewrite.
>> */
>>
>> -unsigned long badness(struct task_struct *p, unsigned long uptime)
>> +static unsigned long __badness(struct task_struct *p,
>> + unsigned long uptime, enum oom_constraint constraint,
>> + struct mem_cgroup *mem)
>> {
>> unsigned long points, cpu_time, run_time;
>> struct mm_struct *mm;
>
> Why rename this function? You are adding a global_badness anyways.
>
just because of history of my own updates...i.e. mistake.
no reason. sorry.
>
>> + /*
>> + * In numa environ, almost all allocation will be against NORMAL zone.
>
> The typical allocations will be against the policy_zone! SGI IA64 (and
> others) have policy_zone == GFP_DMA.
>
Hmm ? ok. I thought GPF_DMA for ia64 was below 4G zone.
If all memory are GFP_DMA(as ppc), that means no lowemem.
I'll just rewrite above comments as
"typical allocation will be against policy_zone".
>> + * But some small area, ex)GFP_DMA for ia64 or GFP_DMA32 for x86-64
>> + * can cause OOM. We can use policy_zone for checking lowmem.
>> + */
>
> Simply say that we are checking if the zone constraint is below the policy
> zone?
>
ok, will rewrite. Too verbose just bacause policy_zone isn't well unknown.
>> + * Now, only mempolicy specifies nodemask. But if nodemask
>> + * covers all nodes, this oom is global oom.
>> + */
>> + if (nodemask && !nodes_equal(node_states[N_HIGH_MEMORY], *nodemask))
>> + ret = CONSTRAINT_MEMORY_POLICY;
>
> Huh? A cpuset can also restrict the nodes?
>
cpuset doesn't pass nodemask for allocation(now).
It checks its nodemask in get_free_page_from_freelist(), internally.
>> + /*
>> + * If not __GFP_THISNODE, zonelist containes all nodes. And if
>
> Dont see any __GFP_THISNODE checks here.
>
If __GFP_THISNODE, zonelist includes local node only. Then zonelist/nodemask
check will hunt it and result will be CONSTRAINT_MEMPOLICY.
Then...hum....recommending CONSTRAINT_THISNODE ?
>> panic("out of memory from page fault. panic_on_oom is selected.\n");
>>
>> read_lock(&tasklist_lock);
>> - __out_of_memory(0, 0); /* unknown gfp_mask and order */
>> + /*
>> + * Considering nature of pages required for page-fault,this must be
>> + * global OOM (if not cpuset...). Then, CONSTRAINT_NONE is correct.
>> + * zonelist, nodemasks are unknown...
>> + */
>> + __out_of_memory(0, CONSTRAINT_NONE, 0, NULL);
>> read_unlock(&tasklist_lock);
>
> Page faults can occur on processes that have memory restrictions.
>
yes. comments are bad. will rewrite. But we don't have any useful
information here.Fixing pagefault_out_of_memory is on my to-do-list.
It seems wrong.
But a condition unclear to me is when VM_FAULT_OOM can be returned
without oom-kill...so plz give me time.
Thanks,
-Kame
--
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:[~2009-11-02 23:02 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 7:22 [RFC][-mm][PATCH 0/6] oom-killer: total renewal KAMEZAWA Hiroyuki
2009-11-02 7:22 ` KAMEZAWA Hiroyuki
2009-11-02 7:24 ` [RFC][-mm][PATCH 1/6] oom-killer: updates for classification of OOM KAMEZAWA Hiroyuki
2009-11-02 7:24 ` KAMEZAWA Hiroyuki
2009-11-02 17:05 ` Christoph Lameter
2009-11-02 17:05 ` Christoph Lameter
2009-11-02 23:02 ` KAMEZAWA Hiroyuki [this message]
2009-11-02 23:02 ` KAMEZAWA Hiroyuki
2009-11-03 20:18 ` David Rientjes
2009-11-03 20:18 ` David Rientjes
2009-11-04 0:01 ` KAMEZAWA Hiroyuki
2009-11-04 0:01 ` KAMEZAWA Hiroyuki
2009-11-02 7:25 ` [RFC][-mm][PATCH 2/6] oom-killer: count swap usage per process KAMEZAWA Hiroyuki
2009-11-02 7:25 ` KAMEZAWA Hiroyuki
2009-11-02 17:07 ` Christoph Lameter
2009-11-02 17:07 ` Christoph Lameter
2009-11-02 23:03 ` KAMEZAWA Hiroyuki
2009-11-02 23:03 ` KAMEZAWA Hiroyuki
2009-11-03 19:47 ` David Rientjes
2009-11-03 19:47 ` David Rientjes
2009-11-04 0:02 ` KAMEZAWA Hiroyuki
2009-11-04 0:02 ` KAMEZAWA Hiroyuki
2009-11-02 7:26 ` [RFC][-mm][PATCH 3/6] oom-killer: count lowmem rss KAMEZAWA Hiroyuki
2009-11-02 7:26 ` KAMEZAWA Hiroyuki
2009-11-02 17:09 ` Christoph Lameter
2009-11-02 17:09 ` Christoph Lameter
2009-11-02 23:11 ` KAMEZAWA Hiroyuki
2009-11-02 23:11 ` KAMEZAWA Hiroyuki
2009-11-03 20:24 ` David Rientjes
2009-11-03 20:24 ` David Rientjes
2009-11-04 0:22 ` KAMEZAWA Hiroyuki
2009-11-04 0:22 ` KAMEZAWA Hiroyuki
2009-11-02 7:27 ` [RFC][-mm][PATCH 4/6] oom-killer: fork bomb detector KAMEZAWA Hiroyuki
2009-11-02 7:27 ` KAMEZAWA Hiroyuki
2009-11-02 8:39 ` KAMEZAWA Hiroyuki
2009-11-02 8:39 ` KAMEZAWA Hiroyuki
2009-11-02 7:28 ` [RFC][-mm][PATCH 5/6] oom-killer: check last total_vm expansion KAMEZAWA Hiroyuki
2009-11-02 7:28 ` KAMEZAWA Hiroyuki
2009-11-03 20:29 ` David Rientjes
2009-11-03 20:29 ` David Rientjes
2009-11-04 0:25 ` KAMEZAWA Hiroyuki
2009-11-04 0:25 ` KAMEZAWA Hiroyuki
2009-11-02 7:30 ` [RFC][-mm][PATCH 6/6] oom-killer: rewrite badness KAMEZAWA Hiroyuki
2009-11-02 7:30 ` KAMEZAWA Hiroyuki
2009-11-02 15:04 ` [RFC][-mm][PATCH 0/6] oom-killer: total renewal Minchan Kim
2009-11-02 15:04 ` Minchan Kim
2009-11-02 15:44 ` KAMEZAWA Hiroyuki
2009-11-02 15:44 ` KAMEZAWA Hiroyuki
2009-11-03 20:34 ` David Rientjes
2009-11-03 20:34 ` David Rientjes
2009-11-03 23:56 ` KAMEZAWA Hiroyuki
2009-11-03 23:56 ` KAMEZAWA Hiroyuki
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=c33e080dcc375d55a4dee1a1314e73f0.squirrel@webmail-b.css.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=rientjes@google.com \
--cc=vedran.furac@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.