Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1677325pxy; Mon, 2 Aug 2021 07:41:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+oeU17m23NKtto7ybe5iHJQdyt3KKQradX+Ex9HfTd39+vaWc4ZRzQjdZQ82k94QfKkTg X-Received: by 2002:a05:6602:5de:: with SMTP id w30mr1839460iox.199.1627915272366; Mon, 02 Aug 2021 07:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627915272; cv=none; d=google.com; s=arc-20160816; b=UKfip2yhiTf9b32ZObj//bBzF07V0UN/YJnkY9993JA0JLoHhWusSkiyZougMTnk3S 44YsC7A24kIXcod/EvyLxJjk+zIaYsLQ+AHDr6bHTcLyD+YR4CHdAAhI3OV6VJcHq7fp JtBXeiSpkZicoXpe82toiWDcgnXj6XMPbZoxc2f/TGRKFpNxpcDkIyImoldMr0KmHHpi YmY8RrISGi0sLcOHmTTSIa8OLqP+q0h98bmKfHqE5e2DE2fCRkFOA+TQACPpywdA/gze 3k8BxKKlD+g568P2saQXz9K4eRBJISYwPxUNS7DFTlVh5CXX0I/bRz2qxICrdbmPjwSu I1UQ== 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=z1m6pfpC9rsy4GSyHGxYSdhbpeh3oHqT/0d9aZ8K278=; b=d8i2xAg69sBh/JqnibC3tZ8FjnyhfSIxGwej5HTrxlwk83KVl1SRYsXxocuzdisFf5 vJpg67WkWNCk6Ut4YrhJc/gJN4/w4VaBPMemOhlTzPOq2kCftBO8cJYg+JmtRJ3IHwV0 TrzJX6WzKFSaQklAon/hVIgKcjwTFXm9WXCndDbJF1y+DqHzb0zvrA6xLj5kd9Ww0gBU GYprd5WwUMo9TJXbsZTBqZZ1q5K1SUjGLUJ1dbKB2bFwN/uX3Vn3cae9DBBqA4E9Mesr Wm/CttsuVflWH2u3OIthZBV5i6qRgxXvdWtr957T2x+QwhHN3dYM1c5XTzTGqAe2mnbK zFDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fdtPnMBt; 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 a16si13185238ilb.149.2021.08.02.07.41.00; Mon, 02 Aug 2021 07:41:12 -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=fdtPnMBt; 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 S234078AbhHBOkF (ORCPT + 99 others); Mon, 2 Aug 2021 10:40:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233940AbhHBOkE (ORCPT ); Mon, 2 Aug 2021 10:40:04 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C13C061760 for ; Mon, 2 Aug 2021 07:39:54 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id h2so34142825lfu.4 for ; Mon, 02 Aug 2021 07:39:54 -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=DN/t2ih4bd5QWWu0wWjgcUBXutecoNnzOYnB+YOUGvP1qPK9HIfqEP5whYPgDunQkA 9q8UveaYo/XJBLY7swiPw8PGjNIKeS5oA/ipUYiTZilgXcNbwo7pnBhHAtexPjcsYCcS iJqBrnx6teJ+7o8LOgMYMllFWsWf6Ugy0K6pXiut7YxFiyGz0F2D57RbmP7fQQH1TZPN G2yTW7Jb0hIjtV2cM/lOWKuX0UNka4365iecYqO+WC2G5/o1FMj69sh9iTDbCul+proK 1ASlWxGbUnH5Qe9x/5niZEpq3Odw21VwJoeej1h3/4x+HzoWyPIvt2tv0meW8oJGeIGI VBNg== X-Gm-Message-State: AOAM533nXQ3dwv1OLlJn9Bvk3tcGWp/NFBSC2x6CO2+Yjrmwt9zt3GFQ H74pjmrUH1/b9HWAdYxzZicUlG2FoBFFBYmXtoNi0Q== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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