Re: [PATCH] oom: Make coredump interruptible
From: Oleg Nesterov
Date: Sun Jun 13 2010 - 11:56:11 EST
On 06/13, KOSAKI Motohiro wrote:
>
> > On 06/04, Oleg Nesterov wrote:
> > >
> > Perhaps something like below makes sense for now.
>
> Probably, this works. at least I don't find any problems.
> But umm... Do you mean we can't implement per-process oom flags?
Sorry, can't understand what you mean.
> example,
> 1) back to implement signal->oom_victim
> because We are using SIGKILL for OOM and struct signal
> naturally represent signal target.
Yes, but if this process participates in the coredump, we should find
the right thread, or mark mm or mm->core_state.
In fact, I was never sure that oom-kill should kill the single process.
Perhaps it should kill all tasks using the same ->mm instead. But this
is another story.
> 2) mm->nr_oom_killed_task
> just avoid simple flag. instead counting number of tasks of
> oom-killed.
again, can't understand.
> I think both avoid your explained problem. Am I missing something?
I guess that I am missing something ;) Please clarify?
> But, again, I have no objection to your patch. because I really hope to
> fix coredump vs oom issue.
Yes, I think this is important. And if we keep the PF_EXITING check in
select_bad_process(), it should be fixed so that at least the coredump
can't fool it. And the "p != current" is obviously not right too.
I'll try to do something next week, the patches should be simple.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/