Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932924AbZKXNbz (ORCPT ); Tue, 24 Nov 2009 08:31:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932858AbZKXNby (ORCPT ); Tue, 24 Nov 2009 08:31:54 -0500 Received: from mail-pz0-f188.google.com ([209.85.222.188]:50438 "EHLO mail-pz0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932838AbZKXNbx convert rfc822-to-8bit (ORCPT ); Tue, 24 Nov 2009 08:31:53 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=XkNhmtJOi9dD8T8q9hLsyH59HonB5eaBg96JIP8HFSmfu8bYa+5mAMl54pbO2m8teO Naec5XSKIAToJsO++g8EF/op6DYdsNmUujAMj9lhTPDfGWrpy7DU+GGfNBvSDJ4TRnzR RbT8cQg+DsgGad8tWH4uN44Gv+kOUT7mHCbAo= MIME-Version: 1.0 In-Reply-To: <20091124145759.194cfc9f.nishimura@mxp.nes.nec.co.jp> References: <20091124145759.194cfc9f.nishimura@mxp.nes.nec.co.jp> Date: Tue, 24 Nov 2009 19:01:54 +0530 X-Google-Sender-Auth: de8da2c5babbb5c5 Message-ID: <661de9470911240531p5e587c42w96995fde37dbd401@mail.gmail.com> Subject: Re: [BUGFIX][PATCH -mmotm] memcg: avoid oom-killing innocent task in case of use_hierarchy From: Balbir Singh To: Daisuke Nishimura Cc: Andrew Morton , LKML , linux-mm , stable , David Rientjes , KAMEZAWA Hiroyuki , KOSAKI Motohiro Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 26 On Tue, Nov 24, 2009 at 11:27 AM, Daisuke Nishimura wrote: > task_in_mem_cgroup(), which is called by select_bad_process() to check whether > a task can be a candidate for being oom-killed from memcg's limit, checks > "curr->use_hierarchy"("curr" is the mem_cgroup the task belongs to). > > But this check return true(it's false positive) when: > > ? ? ? ?/00 ? ? ? ? ?use_hierarchy == 0 ? ? ?<- hitting limit > ? ? ? ? ?/00/aa ? ? use_hierarchy == 1 ? ? ?<- "curr" > > This leads to killing an innocent task in 00/aa. This patch is a fix for this > bug. And this patch also fixes the arg for mem_cgroup_print_oom_info(). We > should print information of mem_cgroup which the task being killed, not current, > belongs to. > Quick Question: What happens if /00 has no tasks in it after your patches? Balbir -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/