Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4924479pxu; Thu, 10 Dec 2020 08:36:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJotqPvtNkzTC0vkBk6tSc+VJuyv/LdtpXV+Fa9CWcL6n9wdFcVAfGR2bAPxzVdBV8FV5W X-Received: by 2002:aa7:db59:: with SMTP id n25mr7398288edt.203.1607618213281; Thu, 10 Dec 2020 08:36:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607618213; cv=none; d=google.com; s=arc-20160816; b=HeA1DocPM3sP7VPjp2lYtJkP7mMxKXSDoUQjA2METLWmUgg3mn1AYDx/wgFqIq5W41 Sv20OsPoS5rpM89LxyVEXr8XmRe6N7nDd24sq9dRsfxc0+n8UP/ViNo9/LQGNFbTLAaA uc2qLQSD1fyK0c7neM9O+BZmMwIWmYo4XXNowdIbguvuA47hqGTatpqvRUWI5lxK9T9n Cxh8RP2QZvmmx0zbpTLh90CCk5U4WbJwNovO0h/B2+mZ2CRqZw/Z6lbmrQzBwmJ4TOrs BMwzL1L/FSA9IUhvaxei9YEo5TV5zO5pbkjlz5Bc6pdr+hPZr6US77KYyAQfGMMxeqmP gmYA== 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=6Uj7y3A8V2AwfLN+Pqn8MEopt38Al+RWbGM3+oeOM5I=; b=Ydj/SI01VnGi13w/HrFGWeq6OCjEk+0c8ulh1+vR4zz76FoHMRy2raHy9QuXZ3YfuY kN92Awx2B0mjsikzl1Ed8DPMTqU3mqbO0YYBXd54n/GYNByb2BdbcdMTKsbq+SuDhJId 4DjCK4sa9mgkRW0oWRYnW+hz643fga5Yb6OjoY8ozsdHMq7QKYnXIiHO5I3uOplUH34O gbth5eVwZHflClIrWYBROiM2hnDzg3H1F028ylNNE35WOq4wJ1o4+g5zqVM/EOas0gne lYdJFvQTIk1iV78FpvNw779m90iHUbIjRXVCpYVKE+js5ZHmU7N6PS6XdU9na4ROsE55 gqaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=C1AKu65P; 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 a13si2832881ejc.128.2020.12.10.08.36.30; Thu, 10 Dec 2020 08:36:53 -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=C1AKu65P; 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 S2387431AbgLJQbY (ORCPT + 99 others); Thu, 10 Dec 2020 11:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391958AbgLJQFC (ORCPT ); Thu, 10 Dec 2020 11:05:02 -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 6E587C06179C for ; Thu, 10 Dec 2020 08:04:21 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id r14so6029186wrn.0 for ; Thu, 10 Dec 2020 08:04:21 -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=6Uj7y3A8V2AwfLN+Pqn8MEopt38Al+RWbGM3+oeOM5I=; b=C1AKu65PSoE7zQcCNy0JQRQoNgwkUc0P9zhgctECcKh2D2QvnaGL/kiQGLaAUPEWaf ORRPEgv7zEwgBlOYKCoVem69+rPqrnkmdBRJTX9zh7pZS/K+n5f0RtDYbXvWCUp0JRpo 0wXQoSNA4pBGbpwJHKw6jX94wupKYKqYIe4yRh5fGSGwsyg0pIAwgOZeNPYdzmtWrckV N14VPhHIRFwm7QftCfbb0M16p+2BInbAx6gHoZkqXnWuG3zEExM2DTEP4aA5k8V3ydJa O4ze2uJfmUW6B2iTyHyVzbAn2dQt6f22d3RxlIZqOO6F5ZWBz65O3UvSHF0zV+vhT95C Wr3Q== 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=6Uj7y3A8V2AwfLN+Pqn8MEopt38Al+RWbGM3+oeOM5I=; b=uKJzsr40ANXj0DEYKGY5HegxP7yDLmb584nhj2PNOBszXTzxUWfe28q1JjHQYqNQF0 NmjNiyczyw49noTyMfeQomUsiwFDq53XeQ1UgUmjPYmULDsIzepA48GBUieW0jvs3D7L ieJ1w8K9gD4qAu6udfzLUQ3hrGj98eI1IlvXoFibr48cKnxPnmCG2mLFqPaQccykW3ao QWhiq6yJfxEoy9KNeexbNpx1uPjra9Qmi7PXIIoeQ8mz6AgmyXsbY9nCQtzD8xEXgdfH Sw7V/DW9PUZStbZ7QVsSgji3lNGlJiJN6+kMdAmuVQoR/2am9py4YA4jPIaFIRgzeOGm 2QBA== X-Gm-Message-State: AOAM530if7BG+Lb5Y2UlwcmZzSXq1W19o5pf9pWOCN1K725El0zvWO6n QB+Ieoj64NWnGAJJA72xyhsm2Q== X-Received: by 2002:adf:fa05:: with SMTP id m5mr9203280wrr.26.1607616260242; Thu, 10 Dec 2020 08:04:20 -0800 (PST) Received: from localhost (p4fdabc80.dip0.t-ipconnect.de. [79.218.188.128]) by smtp.gmail.com with ESMTPSA id k1sm9968055wrp.23.2020.12.10.08.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 08:04:19 -0800 (PST) Date: Thu, 10 Dec 2020 17:02:14 +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: <20201210160214.GG264602@cmpxchg.org> References: <20201206101451.14706-1-songmuchun@bytedance.com> <20201206101451.14706-2-songmuchun@bytedance.com> <20201210160045.GF264602@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201210160045.GF264602@cmpxchg.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 10, 2020 at 05:00:47PM +0100, Johannes Weiner wrote: > 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. Argh, I hit send instead of cancel after noticing that I misread your patch completely. Scratch what I wrote above.