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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 030C9C34031 for ; Tue, 18 Feb 2020 08:26:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B227A206E2 for ; Tue, 18 Feb 2020 08:26:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="DnjHaN1q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B227A206E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A3936B0003; Tue, 18 Feb 2020 03:26:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 454C76B0006; Tue, 18 Feb 2020 03:26:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3448C6B0007; Tue, 18 Feb 2020 03:26:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id 1AB8C6B0003 for ; Tue, 18 Feb 2020 03:26:10 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9B4E9180AD81A for ; Tue, 18 Feb 2020 08:26:09 +0000 (UTC) X-FDA: 76502565258.20.run40_35b96e1b2115f X-HE-Tag: run40_35b96e1b2115f X-Filterd-Recvd-Size: 4245 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Feb 2020 08:26:09 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id n18so21877908ljo.7 for ; Tue, 18 Feb 2020 00:26:09 -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=SZzVxBIxbArWVDJLRLNjSq43L/a2s2BBJxku86c/vqPmaq9ub2QYL2hpb9IeysFdRm AlEPc/koQ6E3p4ln7ZMVbI1ikgVdQ96rA5a0B00TQx5wBEHZdNCtf1c5NsxqM4NrIenO t4CYldsuDXeDJv/1om2IrmAML+4ry2BKreeCPaoZCQNSF/qO/LzKm+kWCxedFqxN5rBl zs8tlaOXt39VwbksGtR+gM/PH8/EYHdP7EpO5JISEy1J+WGdRsGpaPkUXZRxV/WJUveS x07fBU5TNw6taD624baDAbIfC85PbHXtm9Vx2e84IzgtNt2651Rn5R0NkDanvl49HemO Y37Q== X-Gm-Message-State: APjAAAXEgaZ4+SwN45Xk55m+BkPhh9736dUhCGcnhIcGVLOq7i7Gnn98 CkrS2qp1TX0zgRot2o7QfPOWEQ== X-Google-Smtp-Source: APXvYqxe0fjPnzAoZSBTdwq8ivm8QoPOQWpxXLSnYk93TuBbd5ajAuJ3GNhfLzgu6lkObfJc7IdoGg== 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: 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 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