lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110824101927.GB3505@tiehlicka.suse.cz>
Date:	Wed, 24 Aug 2011 12:19:27 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Konstantin Khlebnikov <khlebnikov@...nvz.org>, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Oleg Nesterov <oleg@...hat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH] oom: skip frozen tasks

On Tue 23-08-11 13:18:14, David Rientjes wrote:
> On Tue, 23 Aug 2011, Konstantin Khlebnikov wrote:
> 
> > All frozen tasks are unkillable, and if one of them has TIF_MEMDIE
> > we must kill something else to avoid deadlock. After this patch
> > select_bad_process() will skip frozen task before checking TIF_MEMDIE.
> > 
> 
> The caveat is that if the task in the refrigerator is not OOM_DISABLE and 
> there are no other eligible tasks (system wide, in the cpuset, or in the 
> memcg) to kill, then the machine will panic as a result of this when, in 
> the past, we would simply issue the SIGKILL and keep looping in the page 
> allocator until it is thawed.

mem_cgroup_out_of_memory doesn't panic if nothing has been selected. We
will loop in the charge&reclaim path until somebody frees some memory.

> So you may actually be trading a stall waiting for this thread to thaw for 
> what would now be a panic, and that's not clearly better to me.

When we are in the global OOM condition then you are right, we have a
higher chance to panic. I still find the patch an improvement because
encountering a frozen task and looping over it without any progress
(even though there are other tasks that could be killed) is more
probable than having no killable task at all.
On non-NUMA machines there is even not a big chance that somebody would
be able to thaw a task as the system is already on knees.

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ