Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5612543ybv; Tue, 18 Feb 2020 00:26:41 -0800 (PST) X-Google-Smtp-Source: APXvYqz9Z8a7djiXO7JyVPYp18UZTp1bpKfuUradBKZHMTIsB+esV2uIw4QlS2l8556Qo5ocODRZ X-Received: by 2002:a05:6808:8d0:: with SMTP id k16mr525109oij.68.1582014401209; Tue, 18 Feb 2020 00:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582014401; cv=none; d=google.com; s=arc-20160816; b=H0o3zxyzQcXGAEaPmCvhZqbghZe4TjoqgDJkzEbxcrWNGmAzscHGRiOFFuZk2GkHGV f9G9fhuu/scgX73Jbx7/9OOJc1LcJAXm7zNNhlXpJTM6TV3xXVkqTylYeiSezJDiAXLH bV96eesaQnA5gL3NoCEuLDspon+t7cl11GzTsCTH7nmZtPiex6BekljHgeCUJa0DZ2RI 5TOj7YO/9gvev6co90qwr226Oy7s2zrpB2JVxCc7hOVlF6FZKkjfNTIM5t+sSzjJAfq/ YezuNC/Ik6QQVb8fkcuNGJtjl7lZFeAJrdgHo6oANyH9C0blQ7giCPjQ17tWaI7J8NNv JDcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lPpnBH/Ec+U4BS9aeM6PNHC3PGBciULDCwrtqz+a1OA=; b=L0SMqKSDpYkk5MEVvtjC94V3A9jUqld7HMGzDhwAXtpq5brlVwzaGG3AjEYPjhmo2w eVj++FV+zEK5QrDtFjr0uh1gB7oP9p76XYq9ZhjjCVFJPPD3VOjdcnanQjpOh6t+4VCg mfsyHya27rHnXDbnzSxQzuiXqhR6pPAMzhAc75vDv5Wz84jWcCQpczv6Gif916+Tgf5V luHDCV+AMf5OK7XhWYY8Q3FHcTObaNgl8VdMeThseWPkCo8j1bvh63wcMirupvqSKUFh XaUqWo7P7Tkg/45USpUBp1q0ddBhIJb/lOoAt57rFWl7jkWe/vjrmt/2h9S2FdO1j9fm w8Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DnjHaN1q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si1490859otk.119.2020.02.18.00.26.29; Tue, 18 Feb 2020 00:26:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=DnjHaN1q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbgBRI0K (ORCPT + 99 others); Tue, 18 Feb 2020 03:26:10 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36314 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgBRI0J (ORCPT ); Tue, 18 Feb 2020 03:26:09 -0500 Received: by mail-lj1-f193.google.com with SMTP id r19so21889254ljg.3 for ; Tue, 18 Feb 2020 00:26:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lPpnBH/Ec+U4BS9aeM6PNHC3PGBciULDCwrtqz+a1OA=; b=DnjHaN1qBkLLWyLNs08YhKQSELw6EA3k0PVEYvSL4y5LiKDsAowA2Z0F9NX95BPVZP nAw6kvB/KytsAqAB+591hSD9VA5Fu+U7/JmvzkLXAHZ9i3/ojNPFOr446dxr16L6sEae lpONGATz4gijbGFl+xdBJD54Nzl5LVhnuOsDNnpabjej7SjHZ5cIz+cqTjLAnvS6P5Z1 TaDcyDSjxobPB9rH/taGuvTjMitthUKOwZKCiYT43bJW+AgbdPEoHEiCZ5yDnQfSX7LA KTsS+vfofrNwBuvmWGK5MZFFFIcN2l8pm0ydbrgw6p/lZmhqirL/ot7HkQMxOzEjj8Hd TWXg== 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=lPpnBH/Ec+U4BS9aeM6PNHC3PGBciULDCwrtqz+a1OA=; b=QvKATLXBzq66g1FmU9cG6L85cO7d2I5MHqCKtiMRBJs4bHPIodtmfka7VOmvAIZSmo 5U0jgZC7G7GrAE3QvYpGZBs+u2vAnDIHTn9q00EvMcgLe0gNrMIaxeDyloUVvlLzTe19 DTYYru+FKsXPYKH3rq7C7qCUg5XfHkH+h55SEIF+SBZNJcdv2yf7jdsqLgwxAw+teEx0 mS68hN7ik/7P+xPMHVp4AqaSNfQkL4/ziUATWXAsfldmIERmWBB0P7FCdugzXpxJFhrl 0A3AAaCyITSBIug5XHxJhTl51DOshEQhNgoznRJCtFbZDQpySpl7KSNx24jk10gF7+hR rx7g== X-Gm-Message-State: APjAAAVzRJ3oZgKpwfAhgHHT8TY23sHcZMWkRWpwMGDoAnqL+Xbt3A3o x8Zg6g1XQz+teZ/Koziq92rKBg== X-Received: by 2002:a2e:81d0:: with SMTP id s16mr12350688ljg.166.1582014367627; Tue, 18 Feb 2020 00:26:07 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id i4sm2177411lji.0.2020.02.18.00.26.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 00:26:07 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 68859100E9D; Tue, 18 Feb 2020 11:26:32 +0300 (+03) Date: Tue, 18 Feb 2020 11:26:32 +0300 From: "Kirill A. Shutemov" To: David Rientjes 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 Message-ID: <20200218082632.kn5ouiditzx5h2iq@box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Kirill A. Shutemov