Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2126526imm; Thu, 21 Jun 2018 07:36:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJQAKBCXJ2FN5aZs5hgRZw3LV1SsJ2mT/hkzSNXigu8i6u+vdqjAep+m2/1IOejvDlibzTX X-Received: by 2002:a17:902:9b82:: with SMTP id y2-v6mr29189543plp.69.1529591811377; Thu, 21 Jun 2018 07:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529591811; cv=none; d=google.com; s=arc-20160816; b=Fa1uoXfHr0cFuaVeKo3Gkgt7NsNQ6V6vKEoRoKDPc6HUZZLO1VunVVcJJ1+kfXyo4P mu/SRFXO4IThq2PVBEga5okZYM1RUVWN2GSbDUrx0jyLSXE7yOswLLbWoHI6/1+bkPcx 8TI23IZSycATVI94HkXSecqiJ3EPPTf5vvA50JbmQhtf9RWyoMqYD13LmL8QM7IFFZqb 1hMwZhv127JvsD1XUL86JS2MGm50fZ/KBxvV73F+CHRM6YeaYCaM0OnDsIr24e8fJW1I q0t4Q+hKPp0GqGB911hqlfmTTAy3gFUWO3Tmkfd4butYJQOmnDlX0Dn1VNynGNUcHcOH Bg5A== 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=G5JHiVjcmIJqXosJFomg7k1ePFiaho4lsxfFGSeVsAY=; b=rUxCGBTzEGPlXuGSY+DImvWUkRukYLxKxJFqInMwY8u7orYUf/QVpTQCnxumBdkDIA NoxbY7D2GRxx5ZF/eupsk+kD5ctYR8fZqy04v1H2Kza5gYqNLo8omcY6pApLR+Yb9Zz2 48gbyVcH0fVij9OBBq4t0TJfK3seWty9lNTeV7x2Iz1pxZycQ1B1P1AWjsictqWbYLPP pneraRuBgBsl3p93W/7Pb1h2hNnEZXZ7UDnlpxPJ6AfY9fim3+fFGSTHZNp0HM99JW6/ 0qgkSX1gIiCxdtovdvgS6HeCh34vzbGjzcWk6GmE02zIrmU9nDLj1GRGd+mWO+BQodT9 oEEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cmpxchg.org header.s=x header.b=rhYX6VY0; 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 o3-v6si4150744pgc.381.2018.06.21.07.36.36; Thu, 21 Jun 2018 07:36:51 -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=rhYX6VY0; 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 S1754018AbeFUOfb (ORCPT + 99 others); Thu, 21 Jun 2018 10:35:31 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:48740 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeFUOfa (ORCPT ); Thu, 21 Jun 2018 10:35:30 -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=G5JHiVjcmIJqXosJFomg7k1ePFiaho4lsxfFGSeVsAY=; b=rhYX6VY0MsUwsbHc0Nf8rqKYZg SKqkJ+F2/ApbJnWIWVSwJYQQfAyCloI5omkhkrRzKY46zzRy7I7eAlduDMea83r1vNlVKJ+TFZoOb MSnuS+cokQ0jlYRX+YEy61AoQrLHptPP4S8VZUVc0vz8R8MsK10Wk6/7lWS5GwxRJTBk=; Date: Thu, 21 Jun 2018 10:37:51 -0400 From: Johannes Weiner To: Michal Hocko 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: <20180621143751.GA11230@cmpxchg.org> References: <20180620103736.13880-1-mhocko@kernel.org> <20180621080927.GE10465@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180621080927.GE10465@dhcp22.suse.cz> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 10:09:27AM +0200, Michal Hocko wrote: > @@ -496,14 +496,14 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, > > static inline void mem_cgroup_oom_enable(void) > { > - WARN_ON(current->memcg_may_oom); > - current->memcg_may_oom = 1; > + WARN_ON(current->in_user_fault); > + current->in_user_fault = 1; > } > > static inline void mem_cgroup_oom_disable(void) > { > - WARN_ON(!current->memcg_may_oom); > - current->memcg_may_oom = 0; > + WARN_ON(!current->in_user_fault); > + current->in_user_fault = 0; > } Would it make more sense to rename these to mem_cgroup_enter_user_fault(), mem_cgroup_exit_user_fault()? Other than that, this looks great to me. Thanks