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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 61DA3C83004 for ; Thu, 30 Apr 2020 01:50:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 248F421569 for ; Thu, 30 Apr 2020 01:50:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YsKFQT3r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 248F421569 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D51C38E0005; Wed, 29 Apr 2020 21:50:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D02938E0001; Wed, 29 Apr 2020 21:50:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C19578E0005; Wed, 29 Apr 2020 21:50:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id A7D898E0001 for ; Wed, 29 Apr 2020 21:50:23 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 64A7D4DDB for ; Thu, 30 Apr 2020 01:50:23 +0000 (UTC) X-FDA: 76762841526.10.flesh67_3d921de636023 X-HE-Tag: flesh67_3d921de636023 X-Filterd-Recvd-Size: 4305 Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Thu, 30 Apr 2020 01:50:22 +0000 (UTC) Received: by mail-il1-f193.google.com with SMTP id t12so4420290ile.9 for ; Wed, 29 Apr 2020 18:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y8ASo8zpK+8qPNof8u/cHdMqtlz7+kslUfS8Oj2LKzo=; b=YsKFQT3reOM6k0etzlNKatoAoB8eS3oSXg4aogSsGj+BS7hEjdMtOWVXaO77T/HQKw hEHrq0ofC8VjwZ/x3c3taB/oV7KRQUk+1oNGjllLZimTrlsev1U6dhu0zYATgrIupuLp q0+Pb1D18JWDP/JQ8CNbqKpSNyCWfzylUEcabcyuin1SoTDUBQOEuLVXEL1nTk/jZFS9 hECoJovbAA/7cRjo02LMY0G2azloJS4+2tS526YUo20DtmTdxQEvDDrFzhMO3rPMVxH4 xgBf93K/xt09nGnW7hloNRwre4qBtdkX5aRu425sPKLvu0HFOheQBbJp6rxIBG/dv1li Tfrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y8ASo8zpK+8qPNof8u/cHdMqtlz7+kslUfS8Oj2LKzo=; b=cSKExcJYMbOULUeqLbHVQQdadLXx8oJR2tPxjWQ93FDS3eEFwvATE0KPVXdf/SOGBn hZcOoK/6xvP+U2rhId/WZ4IJ/LT2rpCw00TMmbvsk+nOUnDVh2Sr3BBbWTMt2lA8hwp2 /YtTaG/z34hddN3ncJq6T94LNAkhURSRzdgAAGuqfZw7cauKDf4lkV7dTjg+0ncS/QJV pRZ14fxt116OpcbQ22KUB18d3Qa/kF6eSBc1J4wk4g+RYyONswogNQowWa94zGaqzUY3 mtI4BDZZVdAkDglFPKm3S8aZrMn9LUE6PthEE/puuTuEiF+BMLYviApy0+ZAnC6H5pn3 QPhA== X-Gm-Message-State: AGi0PuZkf72uFLJpkCfOJP9cDe+yoZL/DF6/GguDCFjVPqVMe80UgsHE dnOb5i3oWmgUkVHLNDn/gmxZhBTGIglsUSb+Q48= X-Google-Smtp-Source: APiQypKaO9W65Xbq6DTbEi00VBnOqfpMGUq/H4qUQG6zRhnIEl6P9hJ6oEhz+iXGRx5G3BxLEZMkw1nz0eiSb08RjA8= X-Received: by 2002:a92:8d9d:: with SMTP id w29mr1330029ill.168.1588211422430; Wed, 29 Apr 2020 18:50:22 -0700 (PDT) MIME-Version: 1.0 References: <20200430011626.GA2754277@chrisdown.name> <20200430014603.GB2754277@chrisdown.name> In-Reply-To: <20200430014603.GB2754277@chrisdown.name> From: Yafang Shao Date: Thu, 30 Apr 2020 09:49:46 +0800 Message-ID: Subject: Re: [PATCH 1/2] mm, memcg: Avoid stale protection values when cgroup is above protection To: Chris Down Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Linux MM , Cgroups , LKML Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 30, 2020 at 9:46 AM Chris Down wrote: > > 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. Thanks for your suggestion. I'm planning to add these barriers all over the memory cgroup code. -- Thanks Yafang