Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp730405pxb; Tue, 2 Feb 2021 16:58:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpQ3S3bEG/7kkuU/0HANU4vtwT3ShE3qiEqMQiQS63gfvVhhEIWkd/fIo0ulGKcsApweKq X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr668728edb.259.1612313921379; Tue, 02 Feb 2021 16:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313921; cv=none; d=google.com; s=arc-20160816; b=oVGNIy8Hq3jmCg7VFQN0hAsyAfcCUpyJNdYSPGYgAs4wajLywDbh5eUhesVmCe7vAF eHn6YngOiU/cZzxZQ1qABRrZuP4z0i5v7AYow45bT+sscZPvaA+2wLRs3bCVHbukYXUb oT6lCYR8MEjrzXRIRvqKLNliVuC3GiThjTO+ah5/srkLwAwYyDAWJF2vRcXH+B3vTxsS OHXnTrBTFyorimRTsWKbDUp8/5EwZ1Ivx9UC/SWXAGyWuWeQOElmPe/RFwBzkhZZzeYH fx4zRWzOF1QnEfA/AXjYsOibaY1vIWPBxgGfEetY5Ku1fDdgQQbaCNyejfyAihobjusi uQjA== 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=qNAOPiZhBvntC8C14bTzDHN942diSkXcNrN3eK3rI1U=; b=Wec0qK1TOua55KgZ9LqELvlgeIV6VQCjYG+AsyLPx9stbWWNETyPxCrOCtC2EyVDA5 JP9KwywSwPekollup5KqcqRCdkf3Lkq/w76OPUWGBneV5iEc2Hnt+4SaSQe0wrvwJ/Op soxLXhHQAvVemWLWg4qzVIKcpKA9mXUBhWuUGIYdIiC23TT40LC26Rv9l5LTxHSXfFeo 1OxDeseiYrVz1HNCZzcbeuhikq8ipojnuZYSxLf/PZASXS7s2pYw+03grvF4Z2Q7+RtP HokG50R1yImrojTEpvIP97qaRexnGNp3a7T2vyduyeNBm3lshe7vjcySacdATPMk844H RC2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="py//dvYE"; 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 go43si297183ejc.565.2021.02.02.16.58.17; Tue, 02 Feb 2021 16:58:41 -0800 (PST) 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="py//dvYE"; 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 S234206AbhBBW04 (ORCPT + 99 others); Tue, 2 Feb 2021 17:26:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234208AbhBBWY4 (ORCPT ); Tue, 2 Feb 2021 17:24:56 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BED9AC061786 for ; Tue, 2 Feb 2021 14:24:15 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id b2so30454223lfq.0 for ; Tue, 02 Feb 2021 14:24:15 -0800 (PST) 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=qNAOPiZhBvntC8C14bTzDHN942diSkXcNrN3eK3rI1U=; b=py//dvYEibEFwVmLb4PAzjrsTA3YCydFXpiKsTfJi98dIVrg7qVsUn1zCwPK/765J/ xrxxSxQX34Z5IqSMuCDIcyPNpFXaT6T/zkIQIiYAC7f+RArYPsUtyQj8fLsxWvPGFJQ6 Yl40cJATocGMAb/9yXMC7R1+HkxigN0/ks8Zgc91TApzoAVqBSnBZjmIZiKauDYWUF1N OMrxP2/N93d7LP6Pz8DOpiBEGq4iTW3u84Q1agudNIm3TaixbI+oz0WhuOXFiGxVlbyI n4KOlzRwFVBigG+zifCDblUVxu256mnuXXn89LsK4p3TXqjTFNn0xo+btKP8wd57wFTK cZpw== 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=qNAOPiZhBvntC8C14bTzDHN942diSkXcNrN3eK3rI1U=; b=bQ3JoEGNW1ZU9BduV3T4wNGeNYFXCBZByM+LI318gG5RKOM1ig9+GV4YS/9BFIpeZj +osepJ4u4dSou+fjfBboMJeBj7AmRNo5RmGP9eqfc01cgSrR88Ix6g6Ih5GATv4sDU4S H/qr6maBWD5pAkO/fdPvQpFq6vkAWu+/5BCFMFw9VbmuIeCHIbCT1zeMEcwMWzTK0MZ/ AlOw2JmpSDPdXyYicROGAw29tOsODC2PhdlUK+sG4ZN1LFFoIF7BnTHTZvOdFz9s+jIq ShQtIfO8DdQPucSMDaoXEacll0tOI+gEGFQOVWRq6ENBYMZIrgTmR8eJt+zSKjMZDhkI rfew== X-Gm-Message-State: AOAM5311h+CNAa90Pmek0SRf4IB6gkVa51RYqXich+WV1xU61O0M6OrJ M2sWHE+Z3Vlm11pmpAqqwKEmkVMVg7nUUXTW+yMumQ== X-Received: by 2002:a05:6512:79:: with SMTP id i25mr38591lfo.549.1612304649273; Tue, 02 Feb 2021 14:24:09 -0800 (PST) MIME-Version: 1.0 References: <20210202184746.119084-1-hannes@cmpxchg.org> <20210202184746.119084-2-hannes@cmpxchg.org> In-Reply-To: <20210202184746.119084-2-hannes@cmpxchg.org> From: Shakeel Butt Date: Tue, 2 Feb 2021 14:23:57 -0800 Message-ID: Subject: Re: [PATCH 1/7] mm: memcontrol: fix cpuhotplug statistics flushing To: Johannes Weiner Cc: Andrew Morton , Tejun Heo , Michal Hocko , Roman Gushchin , Linux MM , Cgroups , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 2, 2021 at 12:18 PM Johannes Weiner wrote: > > The memcg hotunplug callback erroneously flushes counts on the local > CPU, not the counts of the CPU going away; those counts will be lost. > > Flush the CPU that is actually going away. > > Also simplify the code a bit by using mod_memcg_state() and > count_memcg_events() instead of open-coding the upward flush - this is > comparable to how vmstat.c handles hotunplug flushing. > > Signed-off-by: Johannes Weiner I think we need Fixes: a983b5ebee572 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") Reviewed-by: Shakeel Butt