Re: zram OOM behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 30, 2012 at 1:30 PM, Luigi Semenzato <semenzato@xxxxxxxxxx> wrote:
>
> On Tue, Oct 30, 2012 at 12:12 PM, Luigi Semenzato <semenzato@xxxxxxxxxx> wrote:
>
> > OK, now someone is going to fix this, right? :-)
>
> Actually, there is a very simple fix:
>
> @@ -355,14 +364,6 @@ static struct task_struct
> *select_bad_process(unsigned int *ppoints,
>                         if (p == current) {
>                                 chosen = p;
>                                 *ppoints = 1000;
> -                       } else if (!force_kill) {
> -                               /*
> -                                * If this task is not being ptraced on exit,
> -                                * then wait for it to finish before killing
> -                                * some other task unnecessarily.
> -                                */
> -                               if (!(p->group_leader->ptrace & PT_TRACE_EXIT))
> -                                       return ERR_PTR(-1UL);
>                         }
>                 }
>
> I'd rather kill some other task unnecessarily than hang!  My load
> works fine with this change.

It also appears that we didn't kill any unnecessary tasks either.

It's just a deadlock
exiting process A encounters a page fault and has to allocate some
memory and goes to sleep
process B which is running the OOM Killer blocks on exiting process
and process A blocks forever on memory while process B blocks on A,
and therefore no memory is released

IMO, the fact that we don't do this when the process is being ptraced
also seems to justify that it's a valid thing to do in all cases.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]