Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp916163imm; Wed, 20 Jun 2018 08:36:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJzCrLinD7CQ/Y30YNPo0xs3whoJH81iS/VYhNZCegqaGjBUtuOQun9Ic6MpVYC9BDz86Hf X-Received: by 2002:a62:d388:: with SMTP id z8-v6mr23636242pfk.8.1529508991056; Wed, 20 Jun 2018 08:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529508991; cv=none; d=google.com; s=arc-20160816; b=POUpY84B5Eri67n0tRT6p8/tfkLbGwEHilYIYPZqI2BfW9KD4UHy440JY8UIp+ssFO 0r/b+W+MHNyIN4NEoKzB52ElyNDKOrxDQci2TdnDwbqWN4loecjTHhGxWbz3jQHGlzpu oBxFRE8jVSLCxTBD66UXqIYxNI/5ZTUzZ/XqCFQ/BkXOybOHWYUoE4/KVLsnak2FQ8bt 5fgDU3CsLDP3OlvT3gam3jQdH1wljsHIdFdKrqRVa5Z+UtxHQY2F884JuuCNzqABmty6 HH6TY6kaoCCpH53gAaYTZlbg2A3gwYTTL++pWM08Guou+gdl0ayzOte6eS5XmTOl3wcN e3VQ== 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:arc-authentication-results; bh=2zukLaIsZOh8TCDSx/lW4j23+R6zdN4j+5xpOEwImJg=; b=j7NU2pSDNNXfeK1mdr/hm1K/MtP9ZunaqfChAlj/UeimphyQb7BSR4L2diU8vypNlm 1nmuZldqx6wwiQo3JgrqFQlFD+YzwGYjWPcRP91tsm8HJOK8HuSj5ymVdeVbK6SdJEkN 0ZtTYn75q1eHIF0ehgvdLcV4ndjpcSjvWPV7hFDnUeq6bCC62Av2WUIxf18EzxorlxTS zJ4u61Rdj4YyK6DJIZVJIKqZuu8pUrTg4W2e0VYqK0ke0aP6qufKpH3Hj7IElJ16Aug7 oIaE1IO42Cgp1md0H0dBDPjRWKFBEtcXQpmVHXYi7QkCqGdw5lwHi9djlAw+va9qUyiN Qj5w== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i88-v6si2704402pfa.219.2018.06.20.08.36.16; Wed, 20 Jun 2018 08:36:31 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754318AbeFTPem (ORCPT + 99 others); Wed, 20 Jun 2018 11:34:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:35693 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754288AbeFTPel (ORCPT ); Wed, 20 Jun 2018 11:34:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0DC25AD7C; Wed, 20 Jun 2018 15:34:40 +0000 (UTC) Date: Wed, 20 Jun 2018 17:34:38 +0200 From: Michal Hocko To: Johannes Weiner Cc: linux-mm@kvack.org, Greg Thelen , Shakeel Butt , Andrew Morton , LKML Subject: Re: [RFC PATCH] memcg, oom: move out_of_memory back to the charge path Message-ID: <20180620153438.GP13685@dhcp22.suse.cz> References: <20180620103736.13880-1-mhocko@kernel.org> <20180620151812.GA2441@cmpxchg.org> <20180620153148.GO13685@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180620153148.GO13685@dhcp22.suse.cz> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 20-06-18 17:31:48, Michal Hocko wrote: > On Wed 20-06-18 11:18:12, Johannes Weiner wrote: [...] > > 1) Why warn for kernel allocations, but not userspace ones? This > > should have a comment at least. > > I am not sure I understand. We do warn for all allocations types of > mem_cgroup_out_of_memory fails as long as we are not in a legacy - > oom_disabled case. OK, I can see it now. It wasn't in the quoted context and I just forgot that WARN(!current->memcg_may_oom, ...). Well, I do not remember why I've made it conditional and you are right it doesn't make any sense. Probably a different code flow back then. Updated to warn regardless of memcg_may_oom. -- Michal Hocko SUSE Labs