Received: by 10.192.165.148 with SMTP id m20csp4555748imm; Tue, 8 May 2018 10:14:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpy47Ng7os9ij3fisP+Dk4KHR6hG0szXCYQW4bkAUqxQFpJTMnBhSFPX+YwQTvBukytH2zI X-Received: by 2002:a17:902:a702:: with SMTP id w2-v6mr22385424plq.8.1525799699763; Tue, 08 May 2018 10:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525799699; cv=none; d=google.com; s=arc-20160816; b=w3OtZzntFJEZ6m6NclKauIiNEovgijYNQDBpsv/Yfv1J+Qi46ue5YCIoY6N0lXqCOv omb4j+CuCPOXXgTerHaihh1E8sbA680vW4P0VKMS13BFAnUawRuosSKBgfMWW/su/luA WnESjXWryL+Yo8iWkVqQT83brdAnkOmRAFhbXPECVGTnFx9+PuAV8E762MVv/indVJHG XcNi5IxOppHT79IH8JGtc15K8XDQo3MlOwGEta3BaHKdaXz4LVDJUedbEVPC/cdmVCzh lQ0LbRigIocafPrEATD6J7Ai2XlO462IAYUB4mHuR3nETzx0PjUGf0QMKOWuBHOsHl3q 2zbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0gHY3fHSXBCZyPC2XXFyN1WpgiS312/pyHsr4QVe4DI=; b=bXpoj7Cp8o5hrplIewsLTvnFa7u96sALsPMIBPCu8EPTSpip4sorytT0BWG9YzrGtg iDwR09v7kxH+11bt9wnQoWrbOvJlrKaQktQm2Y5DciSsA+7xToVhFFXOKXVl11WP37gk wara/XjWX8tB/yNiF09vhexRcgxR/3JWzVR2oqoklRAbjbG4BkaVLTPfZcXxviggpsop YmmVu0t1lTUC2iPWdcmcVzfe8DhGRAI3iiPRmowdJPqE2TgxJlxa0Zr+IoyhJrvo1vOm 0SGIIxsz7zkrmqUKhz13Pb7gb2yMcu4iLhpimk4SwI1/xIK4R1XFWZPluAZ2xGI3xAh7 +pIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=obZmPf+V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g125-v6si19658638pgc.568.2018.05.08.10.14.44; Tue, 08 May 2018 10:14:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=obZmPf+V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755273AbeEHROZ (ORCPT + 99 others); Tue, 8 May 2018 13:14:25 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:49872 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754775AbeEHROY (ORCPT ); Tue, 8 May 2018 13:14:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0gHY3fHSXBCZyPC2XXFyN1WpgiS312/pyHsr4QVe4DI=; b=obZmPf+Vdtqcn8aEyvNkJTXXCN 4eEpJgOzLU2fs750JYdICQbsWXl6r8UYvake74T3l2BCz81uaz8QJDbFC3RDXZaYXg7ZPgjAzZVVg qFNqJPBw7Q5bnkh576oYYvScTLFDTRfnrLrWKD5RBRgJqe3cqKdO6BIyiBM1QjURgTWg=; Date: Tue, 8 May 2018 13:16:10 -0400 From: Johannes Weiner 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 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> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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