From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993272AbcBSPN6 (ORCPT ); Fri, 19 Feb 2016 10:13:58 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38640 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932160AbcBSPN5 (ORCPT ); Fri, 19 Feb 2016 10:13:57 -0500 Date: Fri, 19 Feb 2016 16:13:55 +0100 From: Michal Hocko To: Tetsuo Handa Cc: rientjes@google.com, akpm@linux-foundation.org, mgorman@suse.de, oleg@redhat.com, torvalds@linux-foundation.org, hughd@google.com, andrea@kernel.org, riel@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm,oom: exclude oom_task_origin processes if they are OOM-unkillable. Message-ID: <20160219151355.GJ12690@dhcp22.suse.cz> References: <20160218080909.GA18149@dhcp22.suse.cz> <201602181930.HIH09321.SFVFOQLHOFMJOt@I-love.SAKURA.ne.jp> <20160218120849.GC18149@dhcp22.suse.cz> <20160218121333.GD18149@dhcp22.suse.cz> <201602200007.EAF90182.OQFSOMOFtFJLHV@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201602200007.EAF90182.OQFSOMOFtFJLHV@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 20-02-16 00:07:05, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Thu 18-02-16 13:08:49, Michal Hocko wrote: > > > I guess we can safely remove the memcg > > > argument from oom_badness and oom_unkillable_task. At least from a quick > > > glance... > > > > No we cannot actually. oom_kill_process could select a child which is in > > a different memcg in that case... > > Then, don't we need to check whether processes sharing victim->mm in other > thread groups are in the same memcg when we walk the process list? memcg is bound to the mm not to the task. So all processes sharing the mm after in the same memcg (from the memcg POV). See tast_struct::owner. -- Michal Hocko SUSE Labs