Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1285253ybz; Wed, 29 Apr 2020 18:54:16 -0700 (PDT) X-Google-Smtp-Source: APiQypK94Kby3GXdGHX+bQxe+0NY/KZj9yCRaUHBWx0W/yktnyzRaYxxRBKn4dS6Ux4UPUlPae1s X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr587708eje.47.1588211656856; Wed, 29 Apr 2020 18:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588211656; cv=none; d=google.com; s=arc-20160816; b=b5ANhxDaQXxR6Pk0aIzNWX3Ee0a43MIL0M9niwTWFJ+qwAq7JtOdAzOEpUjfRtz8v5 0tcDOHL0ULVuPqaiG/3P63XFWA9djz0dlNyt4EwXTPWyKHx4Xix+E3loerBBBv3Vexx/ kEK5W3MxoxThrw7hIzlpbsd9QjwFxr4dObkEIezEHvB72EL9AUx3Fpy+W4nL1W6wV26d OnWzvZi5iE8B8XSJNWmjnncRyLv9HAyQPnBPE8QGJ8vNY3RGUAv1IwKiNH50PxzoWAtS 4GUAW9DZellMzRGQbi2HlKCWroi/KEXGRrhydCe2cGRAYbdha56pdE6fvNvnohyuYZj1 FCgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=y8ASo8zpK+8qPNof8u/cHdMqtlz7+kslUfS8Oj2LKzo=; b=q+eH0+kF11EndWKByXfw4AHin+N4/7IU8XRPTXZOl8TltoEd5GXsDkTZ8boTXZLuCj FiB+w2ISd6/R8GSOjr8io2ip0gFo0twcMp6r79RDyba31SIzJ17PlcRPiwJzDa8O1nij OuvxZz+9Ev4l62+udPlB1vBcgAhSvXh3QvX+pevP8VbgY0fRue6hrdzM5ZHEC2pcq2xB NP8i+75ig+6S/VmHbveDwyQ22AI4wvMNEB+1zEcMgBCNBLhPEwHWIoOfLEvGd+XECPls ELMjhHaGBdXDTmh95S606dx/d3dhCEMFl7GbzMDDWy39XdSk1LfhGzO/CwbXT3679bnJ dRSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YsKFQT3r; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si4495804edn.261.2020.04.29.18.53.53; Wed, 29 Apr 2020 18:54:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YsKFQT3r; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgD3BuX (ORCPT + 99 others); Wed, 29 Apr 2020 21:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbgD3BuX (ORCPT ); Wed, 29 Apr 2020 21:50:23 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D30C035494; Wed, 29 Apr 2020 18:50:23 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id i16so4412739ils.12; Wed, 29 Apr 2020 18:50:23 -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=TaB1/EEomAj4KFhqMtx732zsA2V49a+RO7BtRgDVhdC0Tqgy9wYmzOCb75nnX8ZbBG SZ6BNjBDaeivZ7QIFeQumPGarlw6RVKoAcj/xTjgbzKcIlRsSErMBwZt0LKuiNV5BNLe HaB/qAIV9Mf24nmQXENEiuxYV6JNkzHSiBQG6M6eQoELavkXcP3wcqQhgoeIwJQVLXor ooso4pmvS2xN6nj2uFJRSIWQHPpWQ/m6qPUDmTpbYXcY0lCYgxboMff304KgxA5mILlZ o/kWRmi4HjXa2L8jhL0Xyv3NthfQCDPn+GIo1ninDqqG558fHIMRw+2feoObEMK7cE2/ zOUQ== X-Gm-Message-State: AGi0PuZUJ81XxwNcoypICF5MWkRarSRD6rXf3oG0cIZsVwI6stBwWDc/ 0gTSHXwywmBP4qlbJIErHaEXcs3jj72UAv5pAqs= 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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