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 299F5C433DB for ; Tue, 2 Feb 2021 22:24:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A9AE864EDA for ; Tue, 2 Feb 2021 22:24:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9AE864EDA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1C5336B0006; Tue, 2 Feb 2021 17:24:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 176936B006C; Tue, 2 Feb 2021 17:24:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03CA46B006E; Tue, 2 Feb 2021 17:24:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0215.hostedemail.com [216.40.44.215]) by kanga.kvack.org (Postfix) with ESMTP id DF6166B0006 for ; Tue, 2 Feb 2021 17:24:11 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AD42B180AD81F for ; Tue, 2 Feb 2021 22:24:11 +0000 (UTC) X-FDA: 77774757102.16.map88_4016a07275ce Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 859E4100E690B for ; Tue, 2 Feb 2021 22:24:11 +0000 (UTC) X-HE-Tag: map88_4016a07275ce X-Filterd-Recvd-Size: 3516 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 22:24:11 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id i187so30401059lfd.4 for ; Tue, 02 Feb 2021 14:24:10 -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=frnkEa/yG+xJ2sXD54/kcr3KARJGT9CfJ/d5E1sbdHKaOFQOQyAKkyoec6FQVTtGx0 NVPuTseLvub4zOR7w6qsv0A0gIhNIr3MpxfgebSgyutm36V866h0Gir7YvDp+JRkAzQU GBRoZRRtynhyAHYAsZxo13mie0zhFkErclnBmCcInt0ks+4nnoEPDeYdowR9Gi7CxZft JiHqqS7XvRbGfF7vzoLO7HHfwNUM1MYb4Xza29Ctq2DZzuFViie5qvxyyj0hgBjs+uba qNzQZ3jd8PefoJeF+2M1nvTR9AbXXF1tCom7e9OGeUx0MfKnTcqp2NIKDmAd2kjNFbOx /fBg== X-Gm-Message-State: AOAM533eUA/E+80nnYMovg5rAS1Cf9BeWAdM5SfpAOHqVaED1qUrcGuI u62Hxf7hc4va1xf5evAyfM7pUhrHEy+GdixMbGy6VA== X-Google-Smtp-Source: ABdhPJxDKyG3Si6gHUp6yAdVzfGVlKmjgT+cjTkuQvXlB6iWVZokLvFIiH+94cQ/ka0xQ52TT6xd3w4eTNBbQYoHFlI= 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" 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 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