Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp388859ybz; Tue, 21 Apr 2020 23:44:38 -0700 (PDT) X-Google-Smtp-Source: APiQypKm6apufuPoC/IOwBEMJRyrnTSxueaQNtdjqKGvC+Ak9LZbMl0KmicIDXSohd5mu/qzZ3fo X-Received: by 2002:a50:f693:: with SMTP id d19mr22691104edn.57.1587537877991; Tue, 21 Apr 2020 23:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587537877; cv=none; d=google.com; s=arc-20160816; b=sfNpfTVj/d3pxI/mHB1ovPI4NgXtz5Yv7fJB7dx0FwU135YcNxMZNmAfcP0/lHwV9W oBwXR0cwWCjvfq1OFjZJo0WtSNVoKCIjWjV7XvCSeQmTcK4TpIY66xHzFWRyCJNvq98E dnpbzJCNhui7ZQLwqPu1DHzXO5Ge+aJ0af8w2gmCukyegTz4o/MMSEePv63WFHqc/t3O /KGEfIJsO8w4lKta+BPime94ctDvmZLW6yTGwJ0h3eTDhquBzpjbMUeiHgbnwuewlrDF OPSkf1wepPVNfYBBnXA+Kf4OXLaUqAFExZwKGP7qhUxUX2Al9PGjSYr2NUIAhfoTDwGj AoXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Drc+56Q36eDpJcbMrcUJkfyYMbc4NMUbpx2Oj4m1kIA=; b=yY9ABDIhtXgQM4ZWmy2f/KoYapKFE0JY3Fy7QWlgW4nSeL/Tc21lDkZUdT/aWRvfEP JkdSI8u0wFWTJ6R/EpxRN+h1dgBbSVecIL8rId/AMcyJoP6PA1u0IMXYgIT/lcWG21/t Ct6aDTjWCTVbIXJRnQExgdlJ4ZoGUjEkpT/n3ruSIizSx2hhOERi5rot/pkAA2lLWaog sCjvYc7vibK/ATcyAA7NMZ2FvmvkzkTqyE4Ugd2qhVOe8uywzjvv1T1R7Jil4Zz9wmTL 2g9pC5b3hetDfd3lgfSJKI2qyh4iZUZv/6LmCorE84a5672l0eXDORfHumgOim1zOLbY eGnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CUOUDClk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si2482540edq.472.2020.04.21.23.44.14; Tue, 21 Apr 2020 23:44:37 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=CUOUDClk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbgDVGmQ (ORCPT + 99 others); Wed, 22 Apr 2020 02:42:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbgDVGmP (ORCPT ); Wed, 22 Apr 2020 02:42:15 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9140FC03C1A6; Tue, 21 Apr 2020 23:42:15 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id d184so594001pfd.4; Tue, 21 Apr 2020 23:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Drc+56Q36eDpJcbMrcUJkfyYMbc4NMUbpx2Oj4m1kIA=; b=CUOUDClkinZimUWFeCOxuqvCFZL8oJ4l7+brBtc7xtSfkuDi8UsLA+VHKR4YMwKO8p nTywzbCpVQ7TjgRm20khS6C+SNQCruZOWGnqOuj/a8tv10tKQj7t1VUxfkSnU22gi/zI fR64Hpy+yb2ajCoVr8dBtKM84OyeQfsSxka9Uq8WLNa5NNMxZxDZ0n9bqHMHodAr6U5L 95QzwG7l8owtJHvhyDE7oZTAgtceuXBsps0jjvvRYx1zKLY4P7ExdGyVtdz3CplwRa8z L5J0PLgzizfm6wou7IZP9dqjV8T114XHK+SjsE4lXC35XKT+LMJ4J8u035kjiJ69yIEJ l6dg== 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:user-agent; bh=Drc+56Q36eDpJcbMrcUJkfyYMbc4NMUbpx2Oj4m1kIA=; b=jJfotcH2zD9of6+u5AYdfWC/ZnuHqRoPhxkJNM7/1RJdMVpMv9fBYkFQH6wlTmKu09 dJOFG7bYdyjZjnGAy5LHZoVh1q8JGMDbAoE78RFvNKo08c5IkTM40OB4fAEUdelzDMkf 7wslSyiMNLZGLtANfrdDxI/p26FLb298K/2Jgv4c11c77RYyfX/a5v3xCL2pqrPC/fn2 mcd0TrypUJKyKB/M2r2RzVKl277hfXrdqYty9lZ4NvXYtvXUh93IDUv2muUt6Cy9oGIE f5dvVC4Wg18CAwmDa9vxPcMv0G26zo+z8SltoksNB7yV9f4FV1Pl66XBZoKEoMUHoDmj 1mxw== X-Gm-Message-State: AGi0PuYDucSREtbuu//eXpuBsuGCrkbsi13lnQGL6PWpboeJ8STG5EaN OGW3eDZtpS9NyY6rDfEf6KI= X-Received: by 2002:a65:4908:: with SMTP id p8mr24814442pgs.413.1587537735137; Tue, 21 Apr 2020 23:42:15 -0700 (PDT) Received: from js1304-desktop ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id k10sm4467360pfa.163.2020.04.21.23.42.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2020 23:42:14 -0700 (PDT) Date: Wed, 22 Apr 2020 15:42:09 +0900 From: Joonsoo Kim To: Johannes Weiner Cc: Alex Shi , Shakeel Butt , Hugh Dickins , Michal Hocko , "Kirill A. Shutemov" , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 08/18] mm: memcontrol: prepare cgroup vmstat infrastructure for native anon counters Message-ID: <20200422064208.GH6780@js1304-desktop> References: <20200420221126.341272-1-hannes@cmpxchg.org> <20200420221126.341272-9-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200420221126.341272-9-hannes@cmpxchg.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 06:11:16PM -0400, Johannes Weiner wrote: > Anonymous compound pages can be mapped by ptes, which means that if we > want to track NR_MAPPED_ANON, NR_ANON_THPS on a per-cgroup basis, we > have to be prepared to see tail pages in our accounting functions. > > Make mod_lruvec_page_state() and lock_page_memcg() deal with tail > pages correctly, namely by redirecting to the head page which has the > page->mem_cgroup set up. > > Signed-off-by: Johannes Weiner Reviewed-by: Joonsoo Kim