From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37461C83000 for ; Thu, 30 Apr 2020 01:46:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C84C42082E for ; Thu, 30 Apr 2020 01:46:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="sf3CTAKS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C84C42082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2F4CF8E0005; Wed, 29 Apr 2020 21:46:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A5968E0001; Wed, 29 Apr 2020 21:46:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 194158E0005; Wed, 29 Apr 2020 21:46:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id F38B78E0001 for ; Wed, 29 Apr 2020 21:46:06 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id BF1F25851 for ; Thu, 30 Apr 2020 01:46:06 +0000 (UTC) X-FDA: 76762830732.28.crush93_183b18029aa59 X-HE-Tag: crush93_183b18029aa59 X-Filterd-Recvd-Size: 4209 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Thu, 30 Apr 2020 01:46:06 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id 188so90722wmc.2 for ; Wed, 29 Apr 2020 18:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kVsytFlvwmRlPq2e2ylTjFJxkqfOFOkO0kcwGuxLXfk=; b=sf3CTAKS22+/2W8CwVyZC4W5QTvjxrSQYXYwimx3E04EnhPb09pbOUhgikHbXuQcH8 4+kqjU+Fm6hsIahZ+JkODsSb30DePYkcdcqXccwLuKGWPQYKN3XiBFqR9XU6ww7e4oJS 9Sr9WGpbT8cDQDnyDiRS7W5/TjJvUOnc3fL/c= 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:in-reply-to; bh=kVsytFlvwmRlPq2e2ylTjFJxkqfOFOkO0kcwGuxLXfk=; b=LaBvLpnXpJDVhuCj10V5Xgp4vv+MYm1A4F1l1/aTNWbJetYhdB0+kHS5OIOUiuyFW1 EeAClTm63ULEUXAzJG4sOc1JNIbG9YUOotzF5YJoosrHDjFmx42EDAaw+qVDQUwcop4U IBIyBV/jLz9oEBDtBrquMdgE/c8V7cnp583Q+1YsANSSZAAYLsFAJbxTwp1BcSJcLZke E0zjf1B8XLkZlhEm6Creyr3RnpzXF17LZchDB/rnYyu0fF0xvL07auOPH8BsnXeVNxTt DZuZeE77tCmzi24ozkgPWXO4SC0ZfgG/bG3kvXHZ2ciodEtkYlN4H68I4913olw+rFNj Kqjw== X-Gm-Message-State: AGi0PuYDzSN/wT1kpzykahTG1IPWTR/Gv6TQHT+lwH2gaJwnwECgBLAv eKWMcC0o+aaXKU/BGoz0jiy3Dw== X-Google-Smtp-Source: APiQypL/aU3Pwq63058Nq5MGjoH0yWWJ2d7gZXE32aHzAXjf5qhNdcbhBoNgFELiTQFwET2TOZwLhA== X-Received: by 2002:a7b:c0cb:: with SMTP id s11mr208786wmh.180.1588211165307; Wed, 29 Apr 2020 18:46:05 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:56e1:adff:fe3f:49ed]) by smtp.gmail.com with ESMTPSA id a187sm10437581wmh.40.2020.04.29.18.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 18:46:04 -0700 (PDT) Date: Thu, 30 Apr 2020 02:46:03 +0100 From: Chris Down To: Yafang Shao Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Linux MM , Cgroups , LKML Subject: Re: [PATCH 1/2] mm, memcg: Avoid stale protection values when cgroup is above protection Message-ID: <20200430014603.GB2754277@chrisdown.name> References: <20200430011626.GA2754277@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000115, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Yafang Shao writes: >My concern is why we add these barriers to memcg protection >specifically but don't add these barriers to the other memebers like >memcg->oom_group which has the same issue ? >What is the difference between these members and that members ? There are certainly more missing cases -- I didn't look at oom_group specifically, but it sounds likely if there's not other mitigating factors. Most of us have just been busy and haven't had time to comprehensively fix all the potential store and load tears. Tearing is another case of something that would be nice to fix once and for all in the memcg code, but isn't causing any significant issues for the timebeing. We should certainly aim to avoid introducing any new tearing opportunities, though :-) So the answer is just that improvement is incremental and we've not had the time to track down and fix them all. If you find more cases, feel free to send out the patches and I'll be happy to take a look.