Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp47119lql; Fri, 12 Apr 2024 03:21:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8TNJcZMj7YLxledC0ROCn31x9nzCyKHBhj5WyzyOLpc8Ec/Wf3PrV0RuCIrau6Z8lyJ/tFPIwYzZIcTW3CPYOGKmf97SqerWd5iYrZw== X-Google-Smtp-Source: AGHT+IFutWafUs4UtgYIBaOQAZadIKC74aC3Ukc66eNxcHVYY5su759FSMp9XQJneQUhPnaovhK4 X-Received: by 2002:a05:6870:330b:b0:221:8dd0:9920 with SMTP id x11-20020a056870330b00b002218dd09920mr2415753oae.47.1712917285567; Fri, 12 Apr 2024 03:21:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712917285; cv=pass; d=google.com; s=arc-20160816; b=rE4oEyI58PQvOWmrsxFtDSfWGXEpT6oELdKVGuOJE7a4HuP1RLure6rC/yBQFZveN2 fhYAKZIyBnZaZCMW8klnHifObO5XxmP5Mdxpd8aJ8v+JefJTck0SV2E0j8InVcsGtM7/ 8MoA1XRim/+cAsoHxXuiWZoDvBfrX/PrQxtMTwxeMeFKFz2nQcNVqqvNVEMwTFmJ8+oE pOc4ClB16cW5yMfBNVGcUEOsMCqTRlKWgPsDFn4fPoGBx7rQF3fT/IHpPxUye3uH4Thy kJouaDRCo66zNWbg2doPauKQzWb5I2F0trbke9XZiIaNeE26KSo7KFlkfVpjRCD1S5jt S6+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=6lkOntnULigci8RFb9kaYjVxMh1OCe26iNW1hZb6VR8=; fh=uSnUwOL833jL5a9dLnsMgUKlaKRxvvKBpwJCUDDv0C0=; b=iIZGazpehiNkmQfoDmakaeNBqEp41lnOOwg+Jl7CUwoLO6bltC9x84M3cSqVuxD+Ka bP6+iVVL1id3gMT6b8gJuPfwQd8dOiYbhCNTk9RF3uFmkQRO6aHZQJXznEjBGcSW5wmj pSDqE+lIQydlKIP+RuUp8f1phIxl/gCFkI13E1n9ZE20NSpRBqvPJBdsCOAUCcO/G9Uh aZs1mU05wvSV6ehZ4OhQ+IhfvAq+C7AZETTkB6WwSDTBAFVpGFQuz8Sfvjqtnx2TsEKf hqxDJ9B8xW417YIah1DAJmUdpE2emCjgL3T/HlZsDxGA1YpeQL0BD3cKYapXcx7zbRwf 3eZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142486-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142486-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d7-20020a056a00198700b006ecee76286bsi2961707pfl.233.2024.04.12.03.21.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 03:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142486-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-142486-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142486-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1CDB8286ED0 for ; Fri, 12 Apr 2024 10:21:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AE095466B; Fri, 12 Apr 2024 10:21:13 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 12A3153815 for ; Fri, 12 Apr 2024 10:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712917272; cv=none; b=ALwvv9iyEcKLRb/TcHL648YAnMokf7oIlJJCSrLsQMbEM6faO8cIXQEYMFGYp58mFkS0dpMM/NUKFK1dw7E6SVogWhLtKT/O8osiYURMFyqlZXD53Xk3F9oHfW6zuF50Ji84a1C1vM0EO2iJ1nscmEC09TyYrKUiSpKEDZFU1OQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712917272; c=relaxed/simple; bh=43tw20QoZbinHEmGseIrO49gqIWDI3m3fqrMCGS59g0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HlPlb5PaAp6LgQ6CzcmYHCOEl/9x3fMdUu2Sqi29iugIhSot8Z6zb15LtwhTEq3R54WeO7/1IlSdzu9VCGMYUzkDN5pQ9dUiW5k0f45p/m5xbOcWMkd3Kx/iDAs7QbHnVh9O5O92wUBou4d/XthF11T01CbjFqVF31RJK9rghvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 697C4339; Fri, 12 Apr 2024 03:21:39 -0700 (PDT) Received: from [10.57.73.208] (unknown [10.57.73.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 173113F64C; Fri, 12 Apr 2024 03:21:07 -0700 (PDT) Message-ID: <2eae1247-02dc-47e1-b9b2-317a73937651@arm.com> Date: Fri, 12 Apr 2024 11:21:06 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 4/4] mm: correct the docs for thp_fault_alloc and thp_fault_fallback Content-Language: en-GB To: Barry Song <21cnbao@gmail.com>, akpm@linux-foundation.org, linux-mm@kvack.org Cc: cerasuolodomenico@gmail.com, chrisl@kernel.org, david@redhat.com, kasong@tencent.com, linux-kernel@vger.kernel.org, peterx@redhat.com, surenb@google.com, v-songbaohua@oppo.com, willy@infradead.org, yosryahmed@google.com, yuzhao@google.com, corbet@lwn.net References: <20240412073740.294272-1-21cnbao@gmail.com> <20240412073740.294272-5-21cnbao@gmail.com> From: Ryan Roberts In-Reply-To: <20240412073740.294272-5-21cnbao@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/04/2024 08:37, Barry Song wrote: > From: Barry Song > > The documentation does not align with the code. In > __do_huge_pmd_anonymous_page(), THP_FAULT_FALLBACK is incremented when > mem_cgroup_charge() fails, despite the allocation succeeding, whereas > THP_FAULT_ALLOC is only incremented after a successful charge. > > Signed-off-by: Barry Song > Cc: Chris Li > Cc: David Hildenbrand > Cc: Domenico Cerasuolo > Cc: Kairui Song > Cc: Matthew Wilcox (Oracle) > Cc: Peter Xu > Cc: Ryan Roberts > Cc: Suren Baghdasaryan > Cc: Yosry Ahmed > Cc: Yu Zhao > Cc: Jonathan Corbet Reviewed-by: Ryan Roberts > --- > Documentation/admin-guide/mm/transhuge.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst > index f436ff982f22..98e3a99ea780 100644 > --- a/Documentation/admin-guide/mm/transhuge.rst > +++ b/Documentation/admin-guide/mm/transhuge.rst > @@ -369,7 +369,7 @@ monitor how successfully the system is providing huge pages for use. > > thp_fault_alloc > is incremented every time a huge page is successfully > - allocated to handle a page fault. > + allocated and charged to handle a page fault. > > thp_collapse_alloc > is incremented by khugepaged when it has found > @@ -377,7 +377,7 @@ thp_collapse_alloc > successfully allocated a new huge page to store the data. > > thp_fault_fallback > - is incremented if a page fault fails to allocate > + is incremented if a page fault fails to allocate or charge > a huge page and instead falls back to using small pages. > > thp_fault_fallback_charge