From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by kanga.kvack.org (Postfix) with ESMTP id 73C2B6B02BB for ; Tue, 8 May 2018 13:14:25 -0400 (EDT) Received: by mail-wr0-f200.google.com with SMTP id g7-v6so22219193wrb.19 for ; Tue, 08 May 2018 10:14:25 -0700 (PDT) Received: from gum.cmpxchg.org (gum.cmpxchg.org. [85.214.110.215]) by mx.google.com with ESMTPS id 46-v6si3749142edu.103.2018.05.08.10.14.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 10:14:23 -0700 (PDT) Date: Tue, 8 May 2018 13:16:10 -0400 From: Johannes Weiner Subject: Re: [PATCH v2] mm: fix oom_kill event handling Message-ID: <20180508171610.GA24175@cmpxchg.org> References: <20180508124637.29984-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508124637.29984-1-guro@fb.com> Sender: owner-linux-mm@kvack.org List-ID: To: Roman Gushchin Cc: kernel-team@fb.com, Michal Hocko , Vladimir Davydov , Andrew Morton , Konstantin Khlebnikov , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org On Tue, May 08, 2018 at 01:46:37PM +0100, Roman Gushchin wrote: > Commit e27be240df53 ("mm: memcg: make sure memory.events is > uptodate when waking pollers") converted most of memcg event > counters to per-memcg atomics, which made them less confusing > for a user. The "oom_kill" counter remained untouched, so now > it behaves differently than other counters (including "oom"). > This adds nothing but confusion. > > Let's fix this by adding the MEMCG_OOM_KILL event, and follow > the MEMCG_OOM approach. This also removes a hack from > count_memcg_event_mm(), introduced earlier specially for the > OOM_KILL counter. > > Signed-off-by: Roman Gushchin > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Vladimir Davydov > Cc: Andrew Morton > Cc: Konstantin Khlebnikov > Cc: linux-kernel@vger.kernel.org > Cc: cgroups@vger.kernel.org > Cc: linux-mm@kvack.org Acked-by: Johannes Weiner