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=-12.9 required=3.0 tests=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,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=ham 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 49A66C34031 for ; Wed, 19 Feb 2020 01:59:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0145C24654 for ; Wed, 19 Feb 2020 01:59:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GMZy5iX2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0145C24654 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 9CA7C6B0007; Tue, 18 Feb 2020 20:59:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A1056B0008; Tue, 18 Feb 2020 20:59:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B6136B000A; Tue, 18 Feb 2020 20:59:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id 6FAC36B0007 for ; Tue, 18 Feb 2020 20:59:27 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0FBB818DD for ; Wed, 19 Feb 2020 01:59:27 +0000 (UTC) X-FDA: 76505219574.22.cord70_5276db5ba3e5f X-HE-Tag: cord70_5276db5ba3e5f X-Filterd-Recvd-Size: 4396 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 01:59:26 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id b9so11759570pgk.12 for ; Tue, 18 Feb 2020 17:59:26 -0800 (PST) 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=TZ+7kRkf1Lb1X9EkNUXTuLGtV52JPBS+BiH82cZ97uE=; b=GMZy5iX2FbvSR0qa5UWp68F42ojx9YlQxKtTgkrUEsiPsiOTsgLrVojcR12Pf6FHlV A1aT/CgO/luy/th87b66oa3WKnLZePEw0nQorqhPingnsgI9jvQoPgIeu7M+JxbNzugg cMRm8ESMLQMh5CxS3BOb2jjTISrjaYyWGA28/9nx2LGyT/I16zrpMKK1HsG20TLz0ezC +MEbCHc6YRKNYebsZ6Tw7G9vOG1JeRofS4NrpVWHBU9bTeQhSqhmFgX7Dg4o48Mc5KcC vfSIE4bxxBj8mfgL64t+PlyjiptWoqpUiw2aHcElM+xXRqB9+rBt544+0OLVOQr9KLod Eepw== 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=TZ+7kRkf1Lb1X9EkNUXTuLGtV52JPBS+BiH82cZ97uE=; b=hoDoKI64AcyWF4nMg7rCd7bDen8MPnp9qZacWDOVmhl1B7xlCbZdcWOJg7mZlxHxEg 7r13geOFrwVpIrTxMU2ivXH7VF5IPRlQuizWRZhxy8VsXqrM2eKXEWXkLX4axRVn2hmw PLe9GCYdTCsrLKtUEvmf/x97PmTJ//MDMq47sDpp0/BB6jRr6nRCtsw8V9nQFybC/5Qy Cz87MMiEvnlBMwcqCMNewOSTMruAmiAEr38tNfKP9Cdbv6IYDtCS8YQKHVoxZCAZRQlh s5vTUyVXS2T8BugwVcSokYdwjXclCjfAbpUvZZsM2yIrJ3t2CTr5D3aAuLfm2EgH+yv2 6etg== X-Gm-Message-State: APjAAAVH/NWKTpYLqjDRPhDYKW0SAEeffvQwzVvW+VM4pJ76dfSuR1yU YWcPR9t4CFMa6AymtuZkaAk2AQ== X-Google-Smtp-Source: APXvYqw+V0VAtQKn0eaWJa755lGgYuTurTfSIJy5uTIQetEteVKiiY7hKxJ3kAsxkZ2gWHp2GxOq9w== X-Received: by 2002:a63:aa07:: with SMTP id e7mr25757088pgf.90.1582077565568; Tue, 18 Feb 2020 17:59:25 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id r145sm306132pfr.5.2020.02.18.17.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 17:59:24 -0800 (PST) Date: Tue, 18 Feb 2020 17:59:24 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: "Kirill A. Shutemov" cc: Andrew Morton , "Kirill A. Shutemov" , Mike Rapoport , Jeremy Cline , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, thp: track fallbacks due to failed memcg charges separately In-Reply-To: <20200218082632.kn5ouiditzx5h2iq@box> Message-ID: References: <20200218082632.kn5ouiditzx5h2iq@box> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 18 Feb 2020, Kirill A. Shutemov wrote: > On Mon, Feb 17, 2020 at 09:41:40PM -0800, David Rientjes wrote: > > The thp_fault_fallback stat in either /proc/vmstat is incremented if > > either the hugepage allocation fails through the page allocator or the > > hugepage charge fails through mem cgroup. > > > > This patch leaves this field untouched but adds a new field, > > thp_fault_fallback_charge, which is incremented only when the mem cgroup > > charge fails. > > > > This distinguishes between faults that want to be backed by hugepages but > > fail due to fragmentation (or low memory conditions) and those that fail > > due to mem cgroup limits. That can be used to determine the impact of > > fragmentation on the system by excluding faults that failed due to memcg > > usage. > > > > Signed-off-by: David Rientjes > > The patch looks good to me, but I noticed that we miss THP_FAULT_FALLBACK > (and THP_FAULT_FALLBACK_CHARGE) accounting in shmem_getpage_gfp(). > > Could you fix this while you are there? Sure, I'll add it as a predecessor and also count THP_FAULT_ALLOC for consistency.