Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp544513pxb; Sat, 10 Apr 2021 10:45:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZoF3Sman+2+IusqrGvKGa0Tr4TFjkCo4p9Z9YbFaCzImoYzFG7+S9pMhZNGkIfd+nGBZ9 X-Received: by 2002:a17:90a:6285:: with SMTP id d5mr14738763pjj.136.1618076727749; Sat, 10 Apr 2021 10:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618076727; cv=none; d=google.com; s=arc-20160816; b=perYf0BVwaxC6kaNU9QfGdVRICOw0+p0giq+Ee9zxbRB4Kb2GuCv7sI2ikA2nXBOCH w2O7dkc1tIfjLtBjB4yyWVTbvaHg5X5wA0CAyZHtXhxDi+w2PQ/NUuciM/Gd1EQBQBvJ 6j5OalxtLuTJkNwPFp0peEaUVwXuRJxKjKasSZW91vy/o0IV+P7ApPnAgCUgB/zrRlLS wKERpkjZxpWEgokp7cgzT0EgCZ0wfVRLqoXYeXSjwz1POwq47CA/KL0gesjTCw6BBDON SBu7hoRdlGAiacT/CVVK/W8pvTzyezGKIXp2r4xrBLb0lck/+EZM0TgqHNNuFpVl0n94 N26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=esMk4wtxK5QjSki1w8GqTaqU70e3m70uQ3+iN1O/jRI=; b=clutzdSak3WKqId5013g58P63gXimJyJgWA7fzwQGPmvj0JuazpTofNctqTKIojpqI Ab65XdX6aqxXNUn7q2Y1NyoF5cWjt7ZCmAYmrhl4U6OrmmASmysDQS6iGJCJvH2hoP4c HLxTeECoL9NBFPXAmhsXSE0yG7++nNqAgfUJoytkkN5OlRsg/qZw2Ly5mRv3/k1p4AgP qOHuxdK29uQ34rG7gxHG3IIV8tneKhBlzw24DMjjpIM2Ru4AsGGVBsId9rnfZZ3jY92S lhtfQ7+5U+kakRZIP0ypyqiGepmeNtteMlsUrYIaSA2ShmYLgD0zwJqxIjkh9izg/6+Z Hy0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lhHzahZD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x25si6938319pfp.328.2021.04.10.10.45.15; Sat, 10 Apr 2021 10:45:27 -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=@google.com header.s=20161025 header.b=lhHzahZD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234761AbhDJRo7 (ORCPT + 99 others); Sat, 10 Apr 2021 13:44:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234392AbhDJRo7 (ORCPT ); Sat, 10 Apr 2021 13:44:59 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67D05C06138A for ; Sat, 10 Apr 2021 10:44:44 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id v140so14741232lfa.4 for ; Sat, 10 Apr 2021 10:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=esMk4wtxK5QjSki1w8GqTaqU70e3m70uQ3+iN1O/jRI=; b=lhHzahZDj1gMLdiDi/XX+TdfvNNizYENvZUbJwrIUVRU2/diE7cFZPVpW/k1XaJiBf b+/7c5kXVs/jFVIqGKAxF3563w6mBH8JshvbRE82Ghv4LAA8So5dRJ7W5BQZMxcKQSN8 sLkwNYwC2/ZSoxkID3sMpuXqG/zHr2NtSvRID1sL6S2nJlRT+94R/Jhnn32dkzO6Lf2h mZnqG0pYukR+aVuDWGkgGZnCrYG8d5vG+Db13eVBcCl1LufrnKDqCwNVCsNKsRsxrOsb Ib/W98X/9r1yhITrnUfy/1YY609MeDAXRqPacRJTeVQPOlmd6XYPcAaZD+rBxdKJQDAn ptxQ== 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=esMk4wtxK5QjSki1w8GqTaqU70e3m70uQ3+iN1O/jRI=; b=ZpSBVi7ZSR2PnGmA1HbdC61h0vfG/xlGIJd4yP7LCggwp9+0zX3K5I5GNIfuzuccBw jKt8ekRuf16OYplQECTf5qlkheo8/Hk4faI8tFlJlVPWVBs8GZWidm1zrFQi8b5FGV4F ZQbWJBGcydXPttMgPRCmPlmfKu9WWGf6+WJBHnkQaJUrbADpJwLMTFuezA6ytbrHp74f HiQN8IUO3jITinmp6d1k0BrYTQ/vHJ0vbB2ni49iXul4hzGUZe7u4F9tNTlTvbD4l+sq MyQ99qrNaAXIvevlXpsyfb3Bxch9HsCP8WHGQU8vMdkWb4A3lKeYrzndp5zQ2/SF9lpX pk6Q== X-Gm-Message-State: AOAM532bY5XuUA/LhYVzxM22ZJ/oqoUFSRHZe0/1fG7wIoDWSk5lGJU6 MLuyojrrdGMt91NEpr9z0b2G+TLVTqqq2TydOn9GYg== X-Received: by 2002:a05:6512:c04:: with SMTP id z4mr13907650lfu.299.1618076682646; Sat, 10 Apr 2021 10:44:42 -0700 (PDT) MIME-Version: 1.0 References: <20210409122959.82264-1-songmuchun@bytedance.com> <20210409122959.82264-2-songmuchun@bytedance.com> In-Reply-To: <20210409122959.82264-2-songmuchun@bytedance.com> From: Shakeel Butt Date: Sat, 10 Apr 2021 10:44:30 -0700 Message-ID: Subject: Re: [RFC PATCH v2 01/18] mm: memcontrol: fix page charging in page replacement To: Muchun Song Cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Andrew Morton , Vladimir Davydov , LKML , Linux MM , Xiongchun duan , fam.zheng@bytedance.com, Balbir Singh , Yang Shi , Alex Shi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 9, 2021 at 5:32 AM Muchun Song wrote: > > The pages aren't accounted at the root level, so do not charge the page > to the root memcg in page replacement. Although we do not display the > value (mem_cgroup_usage) so there shouldn't be any actual problem, but > there is a WARN_ON_ONCE in the page_counter_cancel(). Who knows if it > will trigger? So it is better to fix it. > > Signed-off-by: Muchun Song > Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt