Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4901778pxu; Thu, 10 Dec 2020 08:07:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcz08Hx4z+3pmMMQzGBA/sjSjkF2Y3wiGsJM2aWZw2Z7j0AJy9TFzgAd/OPRgqvgEKGqm4 X-Received: by 2002:a50:9a83:: with SMTP id p3mr7493197edb.42.1607616445491; Thu, 10 Dec 2020 08:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607616445; cv=none; d=google.com; s=arc-20160816; b=dUczK+D/nRA61F5EtuEasvBo5mf2XirHImAA+xEn31+Zh4d7qJzOX7BedaM+OaXRZt XgA+4Ta2j5qTW+3bOEf8OjpND5Zf5zKUz9IJZlmNwSJzx0mpbB25bv1xak9P0ie+9hR8 Dm+nsF7nymJEGI9WLXxvthD1JpGWOzb9rTKcwxb0kvI4aIRZwmWLIA8Fy6UHMgPatrHt TmRLUmanb8UPMzFP31RHg5cGq4DAoDEuOJLDF/Nq7YtbjCHxp1rG8GGwdIc1w31aS2Ig LaV4N85hqnYbaqdUcnYOePJbRTZbAqRg84/97AY13bV922oAKil51lZ59LO4tJ9LIk73 fMOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6cqy3h6zeyXBfeazWGfRXkH+RsOnGkrK4uYLa4meA10=; b=Kja4s4zdPVxckQF0RZYPWzKuZ3Xs6+yEi3KLPkpKdwb8bm14PXwyiRhfeKtfgggRtt Hx1idf2TlSmbYrJ5K5OTwD8731XF3DYmsPfORcvL9q9K5FD/E2ZDXwJqWknsT5efmU7s a/lHAx1AivQ/iuEay1lxik/9Esr+Oy/X3UGt/Nx7koEXML3cptOfHt2N7Zu2FGcUIaCh 3nxpd0aveYYIGYCz0wnYIF533+wg3OH8MPM3eQyfrMYEz/FatHuWCxqFsm9GCM3AhpNz dgiBQdNfPvHM2/dAH/San3XGPKTXKRmeKnCgKWONm7TQGRmTno5cP9lKimpTuT50EAGm FDcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=F55eqp5B; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rk17si2821768ejb.509.2020.12.10.08.06.59; Thu, 10 Dec 2020 08:07:25 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=F55eqp5B; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403910AbgLJQDy (ORCPT + 99 others); Thu, 10 Dec 2020 11:03:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392200AbgLJQDd (ORCPT ); Thu, 10 Dec 2020 11:03:33 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 500ADC061793 for ; Thu, 10 Dec 2020 08:02:53 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id m5so6013681wrx.9 for ; Thu, 10 Dec 2020 08:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6cqy3h6zeyXBfeazWGfRXkH+RsOnGkrK4uYLa4meA10=; b=F55eqp5BdR+2SiD7cUjPc/dE5pm//HKBnJEcNN5JIQ3kahgaFcm0unTLLFNeCYA/Hd mo7zbwH1GSpHvmwgMtLlswl7zttk633FKLWuA8j2R6zKbbTOwJPzK9qAjGbt32uLuL9E 3qT0+KI8QM1ZnsV+MPMeOJmcQZ+hGQTxRAC3++ooyZlY35akuYScnqpB0mLR0PT38nzY 3/i0V4j1Rd3vnz8E/9ditif0EzUdhdzgBSvDcW91585TV28VDRDMer1gez6ryZTsRRya xFaWZ7TA5GBO/ZOctXMy2slNo0Ju3Vf9KOqund3aOhniPqFeoR78cVC+bfD2xzG5pIjZ +F+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6cqy3h6zeyXBfeazWGfRXkH+RsOnGkrK4uYLa4meA10=; b=PP63Rg7+OqeKSpLwgQwTWhgUqS3xXuyqNuVztbPRu92VVQnKBh2S04NqupFFsQAp83 dw5wIV3lT/V1pIuRWBCfWPe/MC8VpjMrxdKLwo4eiB4OEIwSAgl4FQIW0OHXzTYu+aJJ gWUxqsBA8cmB/egF3Uyps3hrHrDYzS5og8W2f3OhF2qi8BgQxM7Jdh4b5ZHvbANOnN58 Yc83Tr7xf9E1y5KkMXJ30mSYG4cFyRwR/l9OJCRBkpi0aZdc3xtbf1PME4i8otTrePVn qUW87K6/SjFKf2F3X0kMsDVZr8nriV0aRrdg5yFL/BC23gPDunyLLqxYYOu5F4Yp0MdG d3QA== X-Gm-Message-State: AOAM531txxRJg8wyLAqfpQ6VZU9PZival40oQLit4qDb4T0BQkuTeIJK rsg+QazkC+rKujBduhH2ZmuaAQ== X-Received: by 2002:a5d:678d:: with SMTP id v13mr8994936wru.71.1607616171987; Thu, 10 Dec 2020 08:02:51 -0800 (PST) Received: from localhost (p4fdabc80.dip0.t-ipconnect.de. [79.218.188.128]) by smtp.gmail.com with ESMTPSA id h3sm10278777wmm.4.2020.12.10.08.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 08:02:51 -0800 (PST) Date: Thu, 10 Dec 2020 17:00:45 +0100 From: Johannes Weiner To: Muchun Song Cc: gregkh@linuxfoundation.org, rafael@kernel.org, adobriyan@gmail.com, akpm@linux-foundation.org, mhocko@kernel.org, vdavydov.dev@gmail.com, hughd@google.com, will@kernel.org, guro@fb.com, rppt@kernel.org, tglx@linutronix.de, esyr@redhat.com, peterx@redhat.com, krisman@collabora.com, surenb@google.com, avagin@openvz.org, elver@google.com, rdunlap@infradead.org, iamjoonsoo.kim@lge.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [RESEND PATCH v2 01/12] mm: memcontrol: fix NR_ANON_THPS account Message-ID: <20201210160045.GF264602@cmpxchg.org> References: <20201206101451.14706-1-songmuchun@bytedance.com> <20201206101451.14706-2-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201206101451.14706-2-songmuchun@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 06, 2020 at 06:14:40PM +0800, Muchun Song wrote: > The unit of NR_ANON_THPS is HPAGE_PMD_NR already. So it should inc/dec > by one rather than nr_pages. This is a real bug, thanks for catching it. However, your patch changes the user-visible output of /proc/vmstat! NR_ANON_THPS isn't just used by memcg, it's a generic accounting item of the memory subsystem. See this from the Fixes:-patch: - __inc_node_page_state(page, NR_ANON_THPS); + __inc_lruvec_page_state(page, NR_ANON_THPS); While we've considered /proc/vmstat less official than other files like meminfo, and have in the past freely added and removed items, changing the unit of an existing one is not going to work.