Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1444252ybt; Sun, 14 Jun 2020 23:47:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyjHC4bZrPGm+mcVzCV+caDmzxNbv+51oZpqyn6ASVZsCdi04gIaARK30hTekNRdtI+7GP X-Received: by 2002:a17:906:c1c1:: with SMTP id bw1mr25153995ejb.379.1592203649892; Sun, 14 Jun 2020 23:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592203649; cv=none; d=google.com; s=arc-20160816; b=SniKTmCYy9Ll6YAMY3g/P3FOtmsHJvZqqkGLMs6plkC4xHF3/sJCa7O2C/bB8egPTG WL6KbZy13wnEPuiCEZihlZvkwZgUb3OqVgfXTxQUAdjimwyGpbkGQ6lWa7UbEnMXEF+X eJVSiuPU3TZFqKLfzD/82hj+6urkrRAboWHSDK51q+oVuaVg4UD1hNLD1LaLAVltFIeD Tgx0zd40Mc7jYEx2w5fTGYIji0fwiOj2jB/Yqaej+xUHgb/YD8BiXe+aUDyS+JbpUvYb n37CCpHzYDTA6u3e+OoXmuYInqx9wMtolgPZMEzOSHPU1yFIcCucfb76C+3Z/LkPJAU/ CNdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=r5bbY+2GSPiy6U8SvmPVHs8hp2v5pEnTmjUC34UGuPc=; b=yff0PWV3kGDZU5kGnIztwSln9kAZ5sTEG2GBsGzIxKcg/gmJav+4o33wqZmLPOIF4T nNl5vAnZDB9CkM0VdRbCfrLV9IbW1mkG/Zl+4ikAnUALQoYMD+u+GXBK63OJIGMC3MKY 4egFm/KFu8YrGHm9JpA2X8KF/bs/b9E7L3B2l+bhY0hGQYvGHXq7hYS926qNcgllnc/b 85FV+6+QyNOvged5TyqnvBK3qTvUEdpIneoxvMyPsb1niaXVN78EG6A2Ll0u4HauwDfD tV2yxMCu9V0QUuu0uhHZHue3yuQSKCpiTrTYPnU51qqRy+FWziN6qH2L6pctY0fZR+UW yBHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w29si8819650edl.502.2020.06.14.23.47.06; Sun, 14 Jun 2020 23:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728421AbgFOGmY (ORCPT + 99 others); Mon, 15 Jun 2020 02:42:24 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41645 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgFOGmX (ORCPT ); Mon, 15 Jun 2020 02:42:23 -0400 Received: by mail-wr1-f65.google.com with SMTP id j10so15791321wrw.8 for ; Sun, 14 Jun 2020 23:42:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=r5bbY+2GSPiy6U8SvmPVHs8hp2v5pEnTmjUC34UGuPc=; b=A135TxUplBv5TP7yop7xA4MgZCmzEHV4flpdG11OANUw20Joq4ZCG61C7vAehszwZM 0WllDiDQTd64vv05gHJXNmo5hOlLM9U4GgUqoo8U0kuhZEs2HlrKStQ6W4opZjxs4KpT VZRXlpHbjbQzFAyj0noPGaoIJ1bonsD2ezmL7q9LiHAl8MB5/fMImUzHQMKdm28dyIv2 qA6bFbExfV/lnLZBnhCAd32NtwC1WHFR75H+R1Wcztd0rm4nff9fWACxHOt2ysvFYX/j mLhjvlBxM8PY2Fd6qarlCA5D3rf9klQpU08zTjYxlYYWyDEIdk7vBcLkAP8clvDXNdlU xM6A== X-Gm-Message-State: AOAM533VyMYk6Y2r76sbgJi7/0UU1yilVtD5dg82E71Kc/C/vHt07NeL 9+yK3VypyPPWNwGgpIMVhOs= X-Received: by 2002:adf:e4d1:: with SMTP id v17mr26738308wrm.224.1592203341583; Sun, 14 Jun 2020 23:42:21 -0700 (PDT) Received: from localhost (ip-37-188-174-201.eurotel.cz. [37.188.174.201]) by smtp.gmail.com with ESMTPSA id h27sm26967510wrb.18.2020.06.14.23.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 23:42:20 -0700 (PDT) Date: Mon, 15 Jun 2020 08:42:19 +0200 From: Michal Hocko To: Chris Down Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH] mm, memcg: prevent missed memory.low load tears Message-ID: <20200615064219.GA25296@dhcp22.suse.cz> References: <20200612174437.GA391453@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200612174437.GA391453@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 12-06-20 18:44:37, Chris Down wrote: > Looks like one of these got missed when massaging in f86b810c2610 ("mm, > memcg: prevent memory.low load/store tearing") with other linux-mm > changes. > > Reported-by: Michal Koutn? > Signed-off-by: Chris Down Acked-by: Michal Hocko > --- > mm/memcontrol.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 0b38b6ad547d..f7cc66a80348 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -6416,7 +6416,7 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, > > if (parent == root) { > memcg->memory.emin = READ_ONCE(memcg->memory.min); > - memcg->memory.elow = memcg->memory.low; > + memcg->memory.elow = READ_ONCE(memcg->memory.low); > goto out; > } > > @@ -6428,7 +6428,8 @@ enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, > atomic_long_read(&parent->memory.children_min_usage))); > > WRITE_ONCE(memcg->memory.elow, effective_protection(usage, parent_usage, > - memcg->memory.low, READ_ONCE(parent->memory.elow), > + READ_ONCE(memcg->memory.low), > + READ_ONCE(parent->memory.elow), > atomic_long_read(&parent->memory.children_low_usage))); > > out: > -- > 2.27.0 > -- Michal Hocko SUSE Labs