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=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=no 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 6FC77C55ABD for ; Tue, 10 Nov 2020 15:20:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C933D207E8 for ; Tue, 10 Nov 2020 15:20:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RHV4dD/P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C933D207E8 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 3028B6B0068; Tue, 10 Nov 2020 10:20:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B1806B0073; Tue, 10 Nov 2020 10:20:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 178716B0074; Tue, 10 Nov 2020 10:20:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id D69876B0068 for ; Tue, 10 Nov 2020 10:20:15 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 57F15181AEF15 for ; Tue, 10 Nov 2020 15:20:15 +0000 (UTC) X-FDA: 77468869590.04.mist05_5b0ac2e272f6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 3509D8007945 for ; Tue, 10 Nov 2020 15:20:15 +0000 (UTC) X-HE-Tag: mist05_5b0ac2e272f6 X-Filterd-Recvd-Size: 3690 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Nov 2020 15:20:14 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id o24so8431457ljj.6 for ; Tue, 10 Nov 2020 07:20:14 -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=WmN5VaPF0VfKq6YJQkL5I5tdRY/0dNSzeDneZSSWFWo=; b=RHV4dD/PH2eVHEGLppo5X2MUled5LUub72YBQga/LNnTZ22HhU43+vTAmrULNqaOte xGl2ryvOIaOWdO9v7vdNUHIDp/iaAovzcdqdoelBQ6Qv5XevhcKuAriM8jvAQE+LFsyM nwn+7aO2ha2d0t+pJl/GfR4HMXoO7WOi0YiH1UHnwv818ggwHmoz6IFNlUY9o0JdpBU1 WIoVB5NYs8bIkMh05qYJsgAm5Vw6ccUNIaDxBRV0wxG8MPrna1i0OJEK418mW3Z9wTiS sFnnXhg7cH4FNPWIxMr1Qe8tctLlxoE/N+QTNM75OGhRH4Kd2GFWqxxKrg9/ykUHzw0o 8DOQ== 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=WmN5VaPF0VfKq6YJQkL5I5tdRY/0dNSzeDneZSSWFWo=; b=Vl4Jz5f+pufJ8KxvJQDKHnXYvKN6s8PIxyrzWeqoKNOUhulW5CVGjEt/6ccxySOYXd 30HJfwisDbqFmLsIDVtV0Un85+8lCciQlcgBwAvhI7NBgiUrQgXwV/65+3w7IFYIm08B H17G4a0Kkef+lWR0mp03axKd19xBeR9twwS2yqBWOTQDn4TPYgciT7kFcoOZ5+Yy1/2W BeuYZo6hRhLn2Kf8Pt3SFHYObmwWwOoh0oUWnZtLvJi3xqYqa+Djp7UFNPTqISUJjoHN WknHMnNjSv8c9lgc1WXFJQHvDuzZlit4q5RDJENLulaGq2uc0gESguoiwSVawTCUQjTE KbFg== X-Gm-Message-State: AOAM533/xXNJokHmxBSec1L06cIjX1Rmgo44c9ysVBzOKXFtOD04mJlY SeNUF0IAHMz+4zyi2H+oearxrv4MtzxSwbyNR0RiOw== X-Google-Smtp-Source: ABdhPJxoc9N1XPBGEHguW7769dHZH8sKInRsdW+9S8b4sQsIlf8L6UFumJc6i1uVUiQZG11Jmn7YJR6o/yq8CEs13Tc= X-Received: by 2002:a2e:874a:: with SMTP id q10mr9197068ljj.446.1605021612719; Tue, 10 Nov 2020 07:20:12 -0800 (PST) MIME-Version: 1.0 References: <20201110031015.15715-1-songmuchun@bytedance.com> In-Reply-To: <20201110031015.15715-1-songmuchun@bytedance.com> From: Shakeel Butt Date: Tue, 10 Nov 2020 07:20:01 -0800 Message-ID: Subject: Re: [PATCH v2] mm: memcg/slab: Fix root memcg vmstats To: Muchun Song Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Vlastimil Babka , Yafang Shao , Chris Down , LKML , Cgroups , Linux MM Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000119, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 9, 2020 at 7:10 PM Muchun Song wrote: > > If we reparent the slab objects to the root memcg, when we free > the slab object, we need to update the per-memcg vmstats to keep > it correct for the root memcg. Now this at least affects the vmstat > of NR_KERNEL_STACK_KB for !CONFIG_VMAP_STACK when the thread stack > size is smaller than the PAGE_SIZE. > > Fixes: ec9f02384f60 ("mm: workingset: fix vmstat counters for shadow nodes") > Signed-off-by: Muchun Song > Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt