Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1671985pxy; Mon, 2 Aug 2021 07:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysTYDVKpF8739m9NdhoO73XFlvjXBCIgrq9hAZtVTEe5PCuWXqOG5C6FEHzxMeAjaJA7U2 X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr18993986edb.167.1627914851103; Mon, 02 Aug 2021 07:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627914851; cv=none; d=google.com; s=arc-20160816; b=hCCRW4PVsTTG7qOafqmx2kqROvqQkNdWuu2QS1j3F5hiVQbBtVBn+xjehI1jVGLvJE D+UN09Ll2InWby7c2djc7IGwEkQ8wSYwNfceVC9VLc5VYIueDxdZHyr/nqWDE0em9X7P t6b+qgP2lxuwgQTxVmtICfPyzVX8/s8QrHGQh+eZH6HLgbj2kp0hMegSjxSGB15RVNAF HiO1K9RDvo5YH+lAIjyXzreBg2m30LoWRCr1UzqigQRHFE7oHpY/+7aBVQupT6B1JJzD qhaEvDgg0Wwu2mg57/M8Rzi5jjDbX4RV25l/E7g0Nykn5dnJph4Gv5GV7jnqZUDWgQBS 2nNQ== 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=19nfVkDw1JHrHyLVrxQ7C3iIv4HJUAVawRYI+zVDKis=; b=MezFbdAR6O2+xzqUligjqaKl0v1t6qffqDsMcz5D4V7ylkL6NWZ75QYS5N3oM2C3wy gzi/sPNaarxqUxlpM6GHmCyo6t4WOCQc+ZcYlYdd3vBTK6hbkXD/eM19QozVT1BUiEX4 DlwPuGjlkLJFOzsBnC6enE8Av/g5syK+bNKknatiuIgXcaZzoxFI4PClmuVk2fCXGRjX 6Cj+/ux0XXRM1nSrmKgpQdtS0AWkjyfKM6U8ST8y2NrFryf557RRur7m+Y90mlRxKxqo O/uXNtt6pg0AsNZaGf4uHs1/N8pZ/13YLpPSajVMlRwmOweZi3siVPe1xP66EOZH3t8d /bIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=g2rXIt6P; 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 bu1si10631911ejb.482.2021.08.02.07.33.47; Mon, 02 Aug 2021 07:34:11 -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=g2rXIt6P; 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 S233939AbhHBOcZ (ORCPT + 99 others); Mon, 2 Aug 2021 10:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234014AbhHBOcY (ORCPT ); Mon, 2 Aug 2021 10:32:24 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC03BC0613D5 for ; Mon, 2 Aug 2021 07:32:14 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id x8so20735047lfe.3 for ; Mon, 02 Aug 2021 07:32:14 -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=19nfVkDw1JHrHyLVrxQ7C3iIv4HJUAVawRYI+zVDKis=; b=g2rXIt6PCcJyTa2L7O6qIeZjWDnqOSfddyk6MrYcfEsfL7ZHrImFAKiYu/6qeNFXml uFaNVZeiebZF2qSRn4MPkT99U8W2aI+dIRtgDQCtGeKJguajzSd2fILGxt3hoaOrg5Al jNhOcCLyG2pjA96otAuaSej7Cs/zqm5fq7ZGMOXetpdUIAfuG7QYlshPWqrprPyvnP/b eWM3QaOgo34fZF71q7x5gABjzMONsiYCOtCG0wrB3MMQG3KaQk5Cflt++3Ea2NnFguBI Vvm4lTfSqGY7YleaXqoyw66XVOUYcxVgtMYqifv6gkKvQu33r8bafyCu1ggNmNAPF1uk 2QEg== 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=19nfVkDw1JHrHyLVrxQ7C3iIv4HJUAVawRYI+zVDKis=; b=cqkOAVytbysXqrwavRX4ITFPU8xg0fkyJKUgeTHPq7YkL0fl5Mw6aDUBPCQtoXOHij E35xi7f3P3ddEudaYf03LK53hdG/IenMp9K7c1Qa7HsFkRYJJkN5SmuvZ3eIaF71wvz1 X/LPwP+nBOPWN39Hh65S0JU377//bKWi+6/+jXUwgNaBY27NfYdeh/aRgMvGHE63+vRS 0jV9NzhFjCu7JRAz6E7tNdfRhRUKwmKvrD+2ZqgzSDk6dq4PvdbHxUdke1BWQTGZXVgu LTYYfBu1cVp+qzK4BLaUfWNaRnZR6AwmzIqKQkESia66I5Bnre4cfjJM8abCefFRCTQI SA1A== X-Gm-Message-State: AOAM532Ns+I8607rFLq1T1EFk1wf1uVUfkN9TZ9Ji5Jsbdo3WrWDRL/V U/eP7XSb6Idq2H2XJUrxD/JtB5gxPB1Fx3qSWID7ow== X-Received: by 2002:a19:ae0f:: with SMTP id f15mr12931254lfc.117.1627914732988; Mon, 02 Aug 2021 07:32:12 -0700 (PDT) MIME-Version: 1.0 References: <20210802022827.10192-1-longman@redhat.com> In-Reply-To: <20210802022827.10192-1-longman@redhat.com> From: Shakeel Butt Date: Mon, 2 Aug 2021 07:32:01 -0700 Message-ID: Subject: Re: [PATCH] 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 Sun, Aug 1, 2021 at 7:28 PM 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 > hence the wrong node, not the one cached in obj_stock. > > 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 After incorporating Michal's comments, you can add: Reviewed-by: Shakeel Butt