From: "Vedran Furač" <vedran.furac@gmail.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
rientjes@google.com
Subject: Re: [RFC][PATCH] oom_kill: avoid depends on total_vm and use real RSS/swap value for oom_score (Re: Memory overcommit
Date: Tue, 27 Oct 2009 18:41:22 +0100 [thread overview]
Message-ID: <4AE730C2.30401@gmail.com> (raw)
In-Reply-To: <20091027164526.da6a23cb.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki wrote:
> On Tue, 27 Oct 2009 15:55:26 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
>>>> Hmm.
>>>> I wonder why we consider VM size for OOM kiling.
>>>> How about RSS size?
>>>>
>>> Maybe the current code assumes "Tons of swap have been generated, already" if
>>> oom-kill is invoked. Then, just using mm->anon_rss will not be correct.
>>>
>>> Hm, should we count # of swap entries reference from mm ?....
>> In Vedran case, he didn't use swap. So, Only considering vm is the problem.
>> I think it would be better to consider both RSS + # of swap entries as
>> Kosaki mentioned.
>>
> Then, maybe this kind of patch is necessary.
> This is on 2.6.31...then I may have to rebase this to mmotom.
> Added more CCs.
>
> Vedran, I'm glad if you can test this patch.
Thanks for the patch! I'll test it during this week a report after that.
> Instead of total_vm, we should use anon/file/swap usage of a process, I think.
> This patch adds mm->swap_usage and calculate oom_score based on
> anon_rss + file_rss + swap_usage.
Isn't file_rss shared between processes? Sorry, I'm newbie. :)
% pmap $(pidof test)
29049: ./test
0000000000400000 4K r-x-- /home/vedranf/dev/tmp/test
0000000000600000 4K rw--- /home/vedranf/dev/tmp/test
00002ba362a80000 116K r-x-- /lib/ld-2.10.1.so
00002ba362a9d000 12K rw--- [ anon ]
00002ba362c9c000 4K r---- /lib/ld-2.10.1.so
00002ba362c9d000 4K rw--- /lib/ld-2.10.1.so
00002ba362c9e000 1320K r-x-- /lib/libc-2.10.1.so
00002ba362de8000 2044K ----- /lib/libc-2.10.1.so
00002ba362fe7000 16K r---- /lib/libc-2.10.1.so
00002ba362feb000 4K rw--- /lib/libc-2.10.1.so
00002ba362fec000 1024028K rw--- [ anon ] // <-- This
00007ffff4618000 84K rw--- [ stack ]
00007ffff47b7000 4K r-x-- [ anon ]
ffffffffff600000 4K r-x-- [ anon ]
total 1027648K
I would just look at anon if that's OK (or possible).
> Considering usual applications, this will be much better information than
> total_vm.
Agreed.
> score PID name
> 4033 3176 gnome-panel
> 4077 3113 xinit
> 4526 3190 python
> 4820 3161 gnome-settings-
> 4989 3289 gnome-terminal
> 7105 3271 tomboy
> 8427 3177 nautilus
> 17549 3140 gnome-session
> 128501 3299 bash
> 256106 3383 mmap
>
> This order is not bad, I think.
Yes, this looks much better now. Bash is only having somewhat strangely
high score.
Regards,
Vedran
WARNING: multiple messages have this Message-ID (diff)
From: "Vedran Furač" <vedran.furac@gmail.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
rientjes@google.com
Subject: Re: [RFC][PATCH] oom_kill: avoid depends on total_vm and use real RSS/swap value for oom_score (Re: Memory overcommit
Date: Tue, 27 Oct 2009 18:41:22 +0100 [thread overview]
Message-ID: <4AE730C2.30401@gmail.com> (raw)
In-Reply-To: <20091027164526.da6a23cb.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki wrote:
> On Tue, 27 Oct 2009 15:55:26 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
>>>> Hmm.
>>>> I wonder why we consider VM size for OOM kiling.
>>>> How about RSS size?
>>>>
>>> Maybe the current code assumes "Tons of swap have been generated, already" if
>>> oom-kill is invoked. Then, just using mm->anon_rss will not be correct.
>>>
>>> Hm, should we count # of swap entries reference from mm ?....
>> In Vedran case, he didn't use swap. So, Only considering vm is the problem.
>> I think it would be better to consider both RSS + # of swap entries as
>> Kosaki mentioned.
>>
> Then, maybe this kind of patch is necessary.
> This is on 2.6.31...then I may have to rebase this to mmotom.
> Added more CCs.
>
> Vedran, I'm glad if you can test this patch.
Thanks for the patch! I'll test it during this week a report after that.
> Instead of total_vm, we should use anon/file/swap usage of a process, I think.
> This patch adds mm->swap_usage and calculate oom_score based on
> anon_rss + file_rss + swap_usage.
Isn't file_rss shared between processes? Sorry, I'm newbie. :)
% pmap $(pidof test)
29049: ./test
0000000000400000 4K r-x-- /home/vedranf/dev/tmp/test
0000000000600000 4K rw--- /home/vedranf/dev/tmp/test
00002ba362a80000 116K r-x-- /lib/ld-2.10.1.so
00002ba362a9d000 12K rw--- [ anon ]
00002ba362c9c000 4K r---- /lib/ld-2.10.1.so
00002ba362c9d000 4K rw--- /lib/ld-2.10.1.so
00002ba362c9e000 1320K r-x-- /lib/libc-2.10.1.so
00002ba362de8000 2044K ----- /lib/libc-2.10.1.so
00002ba362fe7000 16K r---- /lib/libc-2.10.1.so
00002ba362feb000 4K rw--- /lib/libc-2.10.1.so
00002ba362fec000 1024028K rw--- [ anon ] // <-- This
00007ffff4618000 84K rw--- [ stack ]
00007ffff47b7000 4K r-x-- [ anon ]
ffffffffff600000 4K r-x-- [ anon ]
total 1027648K
I would just look at anon if that's OK (or possible).
> Considering usual applications, this will be much better information than
> total_vm.
Agreed.
> score PID name
> 4033 3176 gnome-panel
> 4077 3113 xinit
> 4526 3190 python
> 4820 3161 gnome-settings-
> 4989 3289 gnome-terminal
> 7105 3271 tomboy
> 8427 3177 nautilus
> 17549 3140 gnome-session
> 128501 3299 bash
> 256106 3383 mmap
>
> This order is not bad, I think.
Yes, this looks much better now. Bash is only having somewhat strangely
high score.
Regards,
Vedran
--
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-10-27 17:41 UTC|newest]
Thread overview: 156+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 11:51 Memory overcommit Vedran Furač
2009-10-13 3:08 ` KAMEZAWA Hiroyuki
2009-10-13 17:13 ` Vedran Furač
2009-10-14 4:51 ` KAMEZAWA Hiroyuki
2009-10-20 21:52 ` Vedran Furač
2009-10-26 1:55 ` KAMEZAWA Hiroyuki
2009-10-26 16:16 ` Vedran Furač
2009-10-26 16:16 ` Vedran Furač
2009-10-27 3:22 ` KAMEZAWA Hiroyuki
2009-10-27 3:22 ` KAMEZAWA Hiroyuki
2009-10-27 6:10 ` KOSAKI Motohiro
2009-10-27 6:10 ` KOSAKI Motohiro
2009-10-27 6:34 ` Minchan Kim
2009-10-27 6:34 ` Minchan Kim
2009-10-27 6:36 ` KAMEZAWA Hiroyuki
2009-10-27 6:36 ` KAMEZAWA Hiroyuki
2009-10-27 6:55 ` Minchan Kim
2009-10-27 6:55 ` Minchan Kim
2009-10-27 7:45 ` [RFC][PATCH] oom_kill: avoid depends on total_vm and use real RSS/swap value for oom_score (Re: " KAMEZAWA Hiroyuki
2009-10-27 7:45 ` KAMEZAWA Hiroyuki
2009-10-27 7:56 ` Minchan Kim
2009-10-27 7:56 ` Minchan Kim
2009-10-27 12:38 ` Andrea Arcangeli
2009-10-27 12:38 ` Andrea Arcangeli
2009-10-28 0:22 ` KAMEZAWA Hiroyuki
2009-10-28 0:22 ` KAMEZAWA Hiroyuki
2009-10-28 0:45 ` Vedran Furač
2009-10-28 0:45 ` Vedran Furač
2009-10-27 7:56 ` KAMEZAWA Hiroyuki
2009-10-27 7:56 ` KAMEZAWA Hiroyuki
2009-10-27 8:14 ` Minchan Kim
2009-10-27 8:14 ` Minchan Kim
2009-10-27 8:33 ` KAMEZAWA Hiroyuki
2009-10-27 8:33 ` KAMEZAWA Hiroyuki
2009-10-27 8:52 ` Minchan Kim
2009-10-27 8:52 ` Minchan Kim
2009-10-27 8:56 ` KAMEZAWA Hiroyuki
2009-10-27 8:56 ` KAMEZAWA Hiroyuki
2009-10-27 17:41 ` Vedran Furač [this message]
2009-10-27 17:41 ` Vedran Furač
2009-10-28 0:13 ` KAMEZAWA Hiroyuki
2009-10-28 0:13 ` KAMEZAWA Hiroyuki
2009-10-27 18:39 ` Hugh Dickins
2009-10-27 18:39 ` Hugh Dickins
2009-10-27 18:47 ` Andrea Arcangeli
2009-10-27 18:47 ` Andrea Arcangeli
2009-10-28 0:32 ` KAMEZAWA Hiroyuki
2009-10-28 0:32 ` KAMEZAWA Hiroyuki
2009-11-05 19:02 ` Pavel Machek
2009-11-05 19:02 ` Pavel Machek
2009-10-28 0:28 ` KAMEZAWA Hiroyuki
2009-10-28 0:28 ` KAMEZAWA Hiroyuki
2009-10-27 6:46 ` KOSAKI Motohiro
2009-10-27 6:46 ` KOSAKI Motohiro
2009-10-27 6:56 ` Minchan Kim
2009-10-27 6:56 ` Minchan Kim
2009-10-27 17:12 ` Vedran Furač
2009-10-27 17:12 ` Vedran Furač
2009-10-27 18:02 ` KOSAKI Motohiro
2009-10-27 18:30 ` Vedran Furač
2009-10-27 18:30 ` Vedran Furač
2009-10-27 20:44 ` Hugh Dickins
2009-10-27 20:44 ` Hugh Dickins
2009-10-27 21:04 ` David Rientjes
2009-10-27 21:04 ` David Rientjes
2009-10-28 0:08 ` Vedran Furač
2009-10-28 0:08 ` Vedran Furač
2009-10-28 0:25 ` David Rientjes
2009-10-28 0:25 ` David Rientjes
2009-10-28 0:39 ` Vedran Furač
2009-10-28 0:39 ` Vedran Furač
2009-10-28 4:08 ` David Rientjes
2009-10-28 4:08 ` David Rientjes
2009-10-28 4:55 ` KAMEZAWA Hiroyuki
2009-10-28 4:55 ` KAMEZAWA Hiroyuki
2009-10-28 5:13 ` David Rientjes
2009-10-28 5:13 ` David Rientjes
2009-10-28 6:05 ` KAMEZAWA Hiroyuki
2009-10-28 6:05 ` KAMEZAWA Hiroyuki
2009-10-28 6:17 ` David Rientjes
2009-10-28 6:17 ` David Rientjes
2009-10-28 6:20 ` KAMEZAWA Hiroyuki
2009-10-28 6:20 ` KAMEZAWA Hiroyuki
2009-10-29 8:38 ` David Rientjes
2009-10-29 8:38 ` David Rientjes
2009-10-29 11:11 ` Vedran Furač
2009-10-29 11:11 ` Vedran Furač
2009-10-29 19:53 ` David Rientjes
2009-10-29 19:53 ` David Rientjes
2009-10-29 23:48 ` KAMEZAWA Hiroyuki
2009-10-29 23:48 ` KAMEZAWA Hiroyuki
2009-10-30 9:10 ` David Rientjes
2009-10-30 9:10 ` David Rientjes
2009-10-30 9:36 ` KAMEZAWA Hiroyuki
2009-10-30 9:36 ` KAMEZAWA Hiroyuki
2009-10-30 10:49 ` Thomas Fjellstrom
2009-11-03 20:49 ` David Rientjes
2009-11-03 20:49 ` David Rientjes
2009-11-04 0:50 ` KAMEZAWA Hiroyuki
2009-11-04 0:50 ` KAMEZAWA Hiroyuki
2009-11-04 1:58 ` David Rientjes
2009-11-04 1:58 ` David Rientjes
2009-11-04 2:17 ` KAMEZAWA Hiroyuki
2009-11-04 2:17 ` KAMEZAWA Hiroyuki
2009-11-04 3:10 ` David Rientjes
2009-11-04 3:10 ` David Rientjes
2009-11-04 3:19 ` KAMEZAWA Hiroyuki
2009-11-04 3:19 ` KAMEZAWA Hiroyuki
2009-10-30 13:59 ` Vedran Furač
2009-10-30 13:59 ` Vedran Furač
2009-10-30 19:24 ` David Rientjes
2009-10-30 19:24 ` David Rientjes
2009-11-02 19:58 ` Vedran Furač
2009-11-02 19:58 ` Vedran Furač
2009-10-28 13:28 ` Vedran Furač
2009-10-28 13:28 ` Vedran Furač
2009-10-28 20:10 ` David Rientjes
2009-10-28 20:10 ` David Rientjes
2009-10-29 3:05 ` Vedran Furač
2009-10-29 3:05 ` Vedran Furač
2009-10-29 8:35 ` David Rientjes
2009-10-29 8:35 ` David Rientjes
2009-10-29 11:01 ` Vedran Furač
2009-10-29 11:01 ` Vedran Furač
2009-10-29 19:42 ` David Rientjes
2009-10-29 19:42 ` David Rientjes
2009-10-30 13:53 ` Vedran Furač
2009-10-30 13:53 ` Vedran Furač
2009-10-30 14:08 ` Thomas Fjellstrom
2009-10-30 14:08 ` Thomas Fjellstrom
2009-10-30 15:13 ` Vedran Furač
2009-10-30 15:13 ` Vedran Furač
2009-10-30 14:12 ` Andrea Arcangeli
2009-10-30 14:12 ` Andrea Arcangeli
2009-10-30 14:41 ` Vedran Furač
2009-10-30 14:41 ` Vedran Furač
2009-10-30 15:15 ` Andrea Arcangeli
2009-10-30 15:15 ` Andrea Arcangeli
2009-10-30 16:24 ` Hugh Dickins
2009-10-30 16:24 ` Hugh Dickins
2009-11-02 19:56 ` Vedran Furač
2009-11-02 19:56 ` Vedran Furač
2009-10-30 19:44 ` David Rientjes
2009-10-30 19:44 ` David Rientjes
2009-11-02 19:56 ` Vedran Furač
2009-11-02 19:56 ` Vedran Furač
2009-10-28 0:43 ` KAMEZAWA Hiroyuki
2009-10-28 0:43 ` KAMEZAWA Hiroyuki
2009-10-28 2:47 ` KOSAKI Motohiro
2009-10-28 2:47 ` KOSAKI Motohiro
2009-10-28 3:17 ` KAMEZAWA Hiroyuki
2009-10-28 3:17 ` KAMEZAWA Hiroyuki
2009-10-28 4:12 ` David Rientjes
2009-10-28 4:12 ` David Rientjes
2009-10-28 8:10 ` Hugh Dickins
2009-10-28 8:10 ` Hugh Dickins
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=4AE730C2.30401@gmail.com \
--to=vedran.furac@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--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 \
/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.