From: Luigi Semenzato <semenzato@google.com>
To: David Rientjes <rientjes@google.com>
Cc: Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, Dan Magenheimer <dan.magenheimer@oracle.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: zram OOM behavior
Date: Mon, 29 Oct 2012 16:34:52 -0700 [thread overview]
Message-ID: <CAA25o9SexCpOKqOLzfm22qc-ZGHMMu6dczMbAXrEuHKtLJqVYw@mail.gmail.com> (raw)
In-Reply-To: <CAA25o9TXbJMxkq=Z6h4Viar1UAOkQ3jyJ0hk_Y9zikuwn-en7w@mail.gmail.com>
On Mon, Oct 29, 2012 at 4:23 PM, Luigi Semenzato <semenzato@google.com> wrote:
> On Mon, Oct 29, 2012 at 3:52 PM, David Rientjes <rientjes@google.com> wrote:
>> On Mon, 29 Oct 2012, Luigi Semenzato wrote:
>>
>>> It looks like it's the final call to schedule() in do_exit():
>>>
>>> 0x81028520 <+1593>: call 0x813b68a0 <schedule>
>>> 0x81028525 <+1598>: ud2a
>>>
>>> (gdb) l *do_exit+0x63e
>>> 0x81028525 is in do_exit
>>> (/home/semenzato/trunk/src/third_party/kernel/files/kernel/exit.c:1069).
>>> 1064
>>> 1065 /* causes final put_task_struct in finish_task_switch(). */
>>> 1066 tsk->state = TASK_DEAD;
>>> 1067 tsk->flags |= PF_NOFREEZE; /* tell freezer to ignore us */
>>> 1068 schedule();
>>> 1069 BUG();
>>> 1070 /* Avoid "noreturn function does return". */
>>> 1071 for (;;)
>>> 1072 cpu_relax(); /* For when BUG is null */
>>> 1073 }
>>>
>>
>> You're using an older kernel since the code you quoted from the oom killer
>> hasn't had the per-memcg oom kill rewrite. There's logic that is called
>> from select_bad_process() that should exclude this thread from being
>> considered and deferred since it has a non-zero task->exit_thread, i.e. in
>> oom_scan_process_thread():
>>
>> if (task->exit_state)
>> return OOM_SCAN_CONTINUE;
>>
>> And that's called from both the global oom killer and memcg oom killer.
>> So I'm thinking you're either running on an older kernel or there is no
>> oom condition at the time this is captured.
> Very sorry, I never said that we're on kernel 3.4.0.
>
> We are in a OOM-kill situation:
>
> ./arch/x86/include/asm/thread_info.h:91:#define TIF_MEMDIE 20
>
> Bit 20 in the threadinfo flags is set:
>
>> [96283.704390] chrome x 815ecd20 0 16573 1112 0x00100104
>
> So your suggestion would be to apply OOM-related patches from a later kernel?
>
> Thanks!
Actually, I am not sure that the 3.6 OOM code is sufficiently
different to avoid this situation. 3.4 already has a test for
task->exit_state, which in my case must be failing even though
TIF_MEMDIE is set and the process has finished do_exit:
do_each_thread(g, p) {
unsigned int points;
if (p->exit_state)
continue;
...
In fact, those changes look mostly cosmetic.
--
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:[~2012-10-29 23:34 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 17:32 Luigi Semenzato
2012-10-03 13:30 ` Konrad Rzeszutek Wilk
[not found] ` <CAA25o9SwO209DD6CUx-LzhMt9XU6niGJ-fBPmgwfcrUvf0BPWA@mail.gmail.com>
2012-10-12 23:30 ` Luigi Semenzato
2012-10-15 14:44 ` Minchan Kim
2012-10-15 18:54 ` Luigi Semenzato
2012-10-16 6:18 ` Minchan Kim
2012-10-16 17:36 ` Luigi Semenzato
2012-10-19 17:49 ` Luigi Semenzato
2012-10-22 23:53 ` Minchan Kim
2012-10-23 0:40 ` Luigi Semenzato
2012-10-23 6:03 ` David Rientjes
2012-10-29 18:26 ` Luigi Semenzato
2012-10-29 19:00 ` David Rientjes
2012-10-29 22:36 ` Luigi Semenzato
2012-10-29 22:52 ` David Rientjes
2012-10-29 23:23 ` Luigi Semenzato
2012-10-29 23:34 ` Luigi Semenzato [this message]
2012-10-30 0:18 ` Minchan Kim
2012-10-30 0:45 ` Luigi Semenzato
2012-10-30 5:41 ` David Rientjes
2012-10-30 19:12 ` Luigi Semenzato
2012-10-30 20:30 ` Luigi Semenzato
2012-10-30 22:32 ` Luigi Semenzato
2012-10-31 18:42 ` David Rientjes
2012-10-30 22:37 ` Sonny Rao
2012-10-31 4:46 ` David Rientjes
2012-10-31 6:14 ` Luigi Semenzato
2012-10-31 6:28 ` Luigi Semenzato
2012-10-31 18:45 ` David Rientjes
2012-10-31 0:57 ` Minchan Kim
2012-10-31 1:06 ` Luigi Semenzato
2012-10-31 1:27 ` Minchan Kim
2012-10-31 3:49 ` Luigi Semenzato
2012-10-31 7:24 ` Minchan Kim
2012-10-31 16:07 ` Luigi Semenzato
2012-10-31 17:49 ` Mandeep Singh Baines
2012-10-31 18:54 ` David Rientjes
2012-10-31 21:40 ` Luigi Semenzato
2012-11-01 2:11 ` Minchan Kim
2012-11-01 4:38 ` David Rientjes
2012-11-01 5:18 ` Minchan Kim
2012-11-01 2:43 ` Minchan Kim
2012-11-01 4:48 ` David Rientjes
2012-11-01 5:26 ` Minchan Kim
2012-11-01 8:28 ` Mel Gorman
2012-11-01 15:57 ` Luigi Semenzato
2012-11-01 15:58 ` Luigi Semenzato
2012-11-01 21:48 ` David Rientjes
2012-11-01 17:50 ` Luigi Semenzato
2012-11-01 21:50 ` David Rientjes
2012-11-01 21:58 ` [patch] mm, oom: allow exiting threads to have access to memory reserves David Rientjes
2012-11-01 22:43 ` Andrew Morton
2012-11-01 23:05 ` David Rientjes
2012-11-01 23:06 ` Luigi Semenzato
2012-11-01 22:04 ` zram OOM behavior Luigi Semenzato
2012-11-01 22:25 ` David Rientjes
2012-11-02 6:39 Minchan Kim
2012-11-02 8:30 ` Mel Gorman
2012-11-02 22:36 ` Minchan Kim
2012-11-05 14:46 ` Mel Gorman
2012-11-06 0:25 ` Minchan Kim
2012-11-06 8:58 ` Mel Gorman
2012-11-06 10:17 ` Minchan Kim
2012-11-09 9:50 ` Mel Gorman
2012-11-12 13:32 ` Minchan Kim
2012-11-12 14:06 ` Mel Gorman
2012-11-13 13:31 ` Minchan Kim
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=CAA25o9SexCpOKqOLzfm22qc-ZGHMMu6dczMbAXrEuHKtLJqVYw@mail.gmail.com \
--to=semenzato@google.com \
--cc=dan.magenheimer@oracle.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox