Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5814268pxu; Thu, 22 Oct 2020 11:42:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1cj8t1fg7o/jqSJeB/UVN5ZZBFZ8J1ybz934CXHSeDtd9RPrd3g22C/71A3CKtLwG6W8+ X-Received: by 2002:a17:906:660f:: with SMTP id b15mr3795272ejp.333.1603392151796; Thu, 22 Oct 2020 11:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603392151; cv=none; d=google.com; s=arc-20160816; b=CCLRkw8zRAz+3EcMAxpDcJUz1kafJUZlxVeaHqMy6lVX0nhO/3xZSCm1rhCNh2OhPa Cw1ee+ate+TFpzmrYQX2i18ZQf0tVfzqMSdoSyn4V/jM4/lUNNkZ3DN/jib1KjBQGSCb N5CD6CNh/VPaYgE/m/zPi2CQ3iIaFahXnc3Yz/2ePFReslOqDKvdMgLHiDD1aiW5O0Bm ib3US64uAXD2cbvZRMVeI9yDurTKRCvr732PHVnekxQP4418kz87N2irY+NqvFfTVT3a +OSWn5aTXoYJHbzkC50LFx2wwoj5L/ahaqmJCC9K2mtMCMr7P92l3MdCfaD1vBvKT41J 8hnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=+Jm50fe41wfDpU30qvqkj0sqMT/OM8dCaofZzxuvBXc=; b=T8b2jf2hy2qTiDN686FA89GtakQfUDVCv1KT+JQ7GObMf6wgKVAvgG75slujGTRj5q qqj/zjKbxzyeYBPp209Xzfc+rqsielpMuLmbIcGZ7l6NV9dF1CcatJxYQeE+aUJq48ML oqntGlkHoK9FGewHj+lQfyd2QNGIMwVguEibm3n8/i6BZGKoHM6T/xaFHvdfyInTnIAA uVDzOF4zW+9und02X45XFQWpmqqxZ1g5YOLA/o6dlcq7nSPdf6aM4RqPxuxDZAeMhby7 FesEZNi4oG22fdRTjilDT7G7cbqFpHM6x5Pj7tXp1yfQOlYU/zb1K6Mol8zgozIZeLHP hfnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Ked+h/0S"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si1492182eds.5.2020.10.22.11.42.09; Thu, 22 Oct 2020 11:42:31 -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=@google.com header.s=20161025 header.b="Ked+h/0S"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S368663AbgJVSAf (ORCPT + 99 others); Thu, 22 Oct 2020 14:00:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2901462AbgJVSAe (ORCPT ); Thu, 22 Oct 2020 14:00:34 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98635C0613CE for ; Thu, 22 Oct 2020 11:00:34 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id f38so1087509pgm.2 for ; Thu, 22 Oct 2020 11:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=+Jm50fe41wfDpU30qvqkj0sqMT/OM8dCaofZzxuvBXc=; b=Ked+h/0SpWqtiUKSQ+9P+ieLMEYOUTVO+Qm1xZegAoXCKTnpLFKnApIRgEQNuVl+xY 23Ki0jXwUy5jxqKjbS2p6j57kwY3nhDmCf37yAxUZIDdarrFWzYtYwszarW8AmN7W1tK QaLA/Ut1Q91UzjmR8M+CJmabUDT+4GAGKWWZS3k2oqfzBELUTGLx66J0bAP5qIk5i6tN Vs7wLG8jgWwCSeX8OCz+Zk0H6cEsdJR9buSyEVvsBbfH6HCvq04fuHMoF5qKL3KXNRtP LOqXn+Ehbt1GJq1WgSjRK/9M7jcRx4qYct5wkhxVGQiCFzuQpUmPwAr76h/VN6Cd6ywY QO2A== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=+Jm50fe41wfDpU30qvqkj0sqMT/OM8dCaofZzxuvBXc=; b=jpaWQN1vIi8524FVeLGd6P22DyhAPe0xWuJpj/D2TV7xveBBPiWvIvXcmrA05FCsXO aAdUonPNM6vFDYtbmRYgmau0TbMGzLH7cV9JmO+UKXaMdqMfeY2GpDlQ5HlJt3qH3f+A 2ZPxo68fV3gPdWx+S7xiKMGfaNggMWmqTmSN0eSVfe9ZJR3cGVQqYRg8DWGNho6ly8/4 76Ko/lA5iCyPZDfzfDcpv4FagbFFVTLfLLq/wPtPwdsLx+cSGoDbEWiVfgK2GHcMcvGE sfT/0Dz9Rp5srMtopLdsyJe7QFk/BBEfs8gjn6ilsq4FTUyHYg+dEh2IwnxzylWKyDhy Agig== X-Gm-Message-State: AOAM533WnAVKybj6vN9L41wtYrcjxiw3Yy84J4f2eZHtBhRq1eET9ypP EjZC0GE8SXmpM56t3i3fGJYm5w== X-Received: by 2002:a65:5a0d:: with SMTP id y13mr3202032pgs.436.1603389633998; Thu, 22 Oct 2020 11:00:33 -0700 (PDT) Received: from [2620:15c:17:3:4a0f:cfff:fe51:6667] ([2620:15c:17:3:4a0f:cfff:fe51:6667]) by smtp.gmail.com with ESMTPSA id u12sm2512347pji.30.2020.10.22.11.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 11:00:32 -0700 (PDT) Date: Thu, 22 Oct 2020 11:00:32 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Johannes Weiner cc: Andrew Morton , Michal Hocko , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: memcontrol: add file_thp, shmem_thp to memory.stat In-Reply-To: <20201022151844.489337-1-hannes@cmpxchg.org> Message-ID: References: <20201022151844.489337-1-hannes@cmpxchg.org> User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Oct 2020, Johannes Weiner wrote: > As huge page usage in the page cache and for shmem files proliferates > in our production environment, the performance monitoring team has > asked for per-cgroup stats on those pages. > > We already track and export anon_thp per cgroup. We already track file > THP and shmem THP per node, so making them per-cgroup is only a matter > of switching from node to lruvec counters. All callsites are in places > where the pages are charged and locked, so page->memcg is stable. > > Signed-off-by: Johannes Weiner Acked-by: David Rientjes Nice!