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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham 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 C25F2C432BE for ; Mon, 2 Aug 2021 14:39:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 660FF60E97 for ; Mon, 2 Aug 2021 14:39:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 660FF60E97 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 0E57A6B0036; Mon, 2 Aug 2021 10:39:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 095878D0001; Mon, 2 Aug 2021 10:39:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9F396B006C; Mon, 2 Aug 2021 10:39:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id D02F06B0036 for ; Mon, 2 Aug 2021 10:39:54 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 648801BCC2 for ; Mon, 2 Aug 2021 14:39:54 +0000 (UTC) X-FDA: 78430399908.26.BB5FC95 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf27.hostedemail.com (Postfix) with ESMTP id 2C3377001F44 for ; Mon, 2 Aug 2021 14:39:54 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id z2so34168767lft.1 for ; Mon, 02 Aug 2021 07:39:53 -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=z1m6pfpC9rsy4GSyHGxYSdhbpeh3oHqT/0d9aZ8K278=; b=fdtPnMBtsMGDTdvX2QBuR6NOVYxQwCHecY1QbSOcjAf9TiIs9eCkCzVwMMO+3YRlEY GvRyLN1BM+Wj0CjkHDuV3TS7ZKAv19LReq4O5Ou7P4B0mdbRU1EzTTm1C4y1wgZ7yNtr +a46F67dQVEAFtzb8DFx420SXHHckE63pTNxmo0Jb/sqX8aRt7aQShh59oLaFTf8v7ZA x5wUBgStITrUg/h47Gg3mo5tlbUFVVzXMkeKeEMSQDumsJcSrKx/HO0rE5ADto6FW+KP 2Mirl0FPCWyv9eytyN5VvtI0xyPxR9GbsZr7pxM+HmkERO+QO3uNUx8VN70c7/i8lXzW z0JA== 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=z1m6pfpC9rsy4GSyHGxYSdhbpeh3oHqT/0d9aZ8K278=; b=ucAORy5Mqjuip15ALO2+mp8tSXwFEosSMSvDCsikW2/sRBVvSGHRasxtqpckxmhzLp zyKkv4NMUFPuY8YydQKZV4MprluTCTrzdqnuiEwPPT4XXHg86dOacokvVIbAlLR2VFdi 1BSVofTQz/73PEvVc5F5a+7yWL7xDhrq3gWmlTaMV2CTxk+14gTz6o5nEmWLrrMkpwGg 3QklBfCJgG1MBaw0T/4LNwo55K1HaFa4axNL4BbBHZWbIJZtGIPq31DDCuHuVoPtCkl4 ir+40DCs0hs07D65jld2VFhEpRKz5DULd8pFjhuU8FwMS8cYoh/+02C3MXErE4m4MDgA bdSw== X-Gm-Message-State: AOAM531MkXHBjC1YOMOtIbLGFEZeRhAI6GmqC0zkgeHYAig4PHu2CJPF xlgA71tvjpa6x/9Hgp+I0bxKkQEfvMzoLeuPOOXwzg== X-Google-Smtp-Source: ABdhPJz8cjD2bkn7AkufetYcve2CByZsWJqgUhktcF6TijRPH3PCVJRD1o5AMgo6fF6IvpQeTHreBiIOhdBkHPiZugQ= X-Received: by 2002:a05:6512:39c6:: with SMTP id k6mr2732067lfu.549.1627915192420; Mon, 02 Aug 2021 07:39:52 -0700 (PDT) MIME-Version: 1.0 References: <20210802143834.30578-1-longman@redhat.com> In-Reply-To: <20210802143834.30578-1-longman@redhat.com> From: Shakeel Butt Date: Mon, 2 Aug 2021 07:39:41 -0700 Message-ID: Subject: Re: [PATCH v2] mm/memcg: Fix incorrect flushing of lruvec data in obj_stock To: Waiman Long Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Tejun Heo , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , LKML , Cgroups , Linux MM , Muchun Song , Alex Shi , Chris Down , Yafang Shao , Wei Yang , Masayoshi Mizuma , Xing Zhengjun , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2C3377001F44 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=fdtPnMBt; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of shakeelb@google.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=shakeelb@google.com X-Stat-Signature: e4o8nga7orxnqhz45aio1rqbs7r6quct X-HE-Tag: 1627915194-446265 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 Mon, Aug 2, 2021 at 7:38 AM Waiman Long wrote: > > When mod_objcg_state() is called with a pgdat that is different from > that in the obj_stock, the old lruvec data cached in obj_stock are > flushed out. Unfortunately, they were flushed to the new pgdat and > so the data go to the wrong node. This will screw up the slab data > reported in /sys/devices/system/node/node*/meminfo. > > Fix that by flushing the data to the cached pgdat instead. > > Fixes: 68ac5b3c8db2 ("mm/memcg: cache vmstat data in percpu memcg_stock_pcp") > Signed-off-by: Waiman Long > Acked-by: Michal Hocko Reviewed-by: Shakeel Butt