Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp101831lqj; Thu, 11 Apr 2024 11:00:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4yTg1NJxOD5Qi1FXF/+2BmJ282hkm29twNvQza4uO0Xbb7SDbDfzBZSRQGyFu9y7FyK28piLkznHftSVjI2xIjXshwNzigPlp2yT0dg== X-Google-Smtp-Source: AGHT+IHY34/sPil+BlcyQQXPHqevL0E/cxE2NcXOwnnS8wyLGBshH88dcZethug+HJDaZRa9tbHT X-Received: by 2002:a05:620a:1211:b0:78d:61f9:7a69 with SMTP id u17-20020a05620a121100b0078d61f97a69mr378479qkj.17.1712858430213; Thu, 11 Apr 2024 11:00:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712858430; cv=pass; d=google.com; s=arc-20160816; b=Ab0n2uU67Pz2YbepAOSxyrar7/yl/V4a4LWI0owHLXc3p+x14TpFte5VFwlNHmeSOx SetiUD5xo8aVhw5eF0Vs1Dt9cYHNm+jQnOGtIc1Qo05Xph97SFZbHtXSW1+0vI1GaDOt RvaFd7wMLUdm2KSKIR7OLB27LmL+qZRHXqNGB8qvkPJia4jh+zmyiuZSr9zwOLnjplCf W05ivQQEYhmP/M5RblHsSQmsw3QxiHg+VhuwD/0zQmB2XzvLInBprPsTj4qBgIUEcVn0 NT0a1KDvb8/5tNN0orObQmUTeQnS9k2JhlSdQ1Pjdx9Tlpq2brPmtPn2yoeAyY2T9s9h rW4w== 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=YR33RvNC4Kh8HNmPxc3EjNBfPG8fkQI4xRuM5v17eAo=; fh=DJ9RJhPvsp+1s+wNWenaByoe81NxnWomFBLLVENMnoE=; b=QmN7Ldc2pv7sHRgc7+FKAkN62SS/PSLlY4viXC/AFuVHsTI0WE1+7aUtCsEu6kOt42 n3+gdA1DphtVukGJ5qSN5jR/dCMAvkHKSwMm0okpRJg8jI8IRn8K6VZpGjNGu0ZjNcaC scvLccbN3+SRJ/giNeVsWHyIlITH5fdBbXRj0DG8lElTrcZwbQzpvxXJN/egP7ZbFvOI 25cHnObrJ7P+A8ha/PEPcYh/hVW54uS+lQcI0GWTLme/6u/UGTacF5V9EbWSIqfXt2ud JOyYpdKVUAkQHxsgYbt5CIUMMFiePngWkNEOZ9cFU7JnFkUZV7KjYqEplWixKPVsUysd hNrg==; 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-141347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z13-20020ae9f44d000000b0078d6920520esi2009770qkl.656.2024.04.11.11.00.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-141347-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141347-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E5BD71C21E58 for ; Thu, 11 Apr 2024 18:00:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 213AD1C233E; Thu, 11 Apr 2024 16:45:47 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 487B515AE0 for ; Thu, 11 Apr 2024 16:45:45 +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=1712853946; cv=none; b=m81wymWiFVwVUJGeINyCytCJkRmaZrx0+GEmNzZL/KGFkoGD9AfUVkaQZKk42Reahxrv0bG6pvH4QYytKPFUGLdl/4db6aLqooaqGfWYwjTMIDtFL0du1k1U1/eDELGK0RBg7lWHa5NtvE5ueDjH4vtyJMqJrEfo7RtGa6k22a0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712853946; c=relaxed/simple; bh=uDph+pMQsOAPYZ80ULDa6Uo+7or2zXPtxlNdIjT8VjA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=paFudzJg9iDz6QNH3naVmcojsuL6juN5A/HSro8TKM+4H2ERb40ubBt551SPkiUB1+d5tKoguDOUf/LbCg8zxs0GgNphRXsDuGlPF3JfazSc1K/L05c0tzyyEIWCAnQpF4Pu6IGD+RprrVJosRtGyCg85ycQXF4jzKzzMrjtbec= 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 341A6113E; Thu, 11 Apr 2024 09:46:14 -0700 (PDT) Received: from [10.1.38.151] (XHFQ2J9959.cambridge.arm.com [10.1.38.151]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E9503F6C4; Thu, 11 Apr 2024 09:45:42 -0700 (PDT) Message-ID: Date: Thu, 11 Apr 2024 17:45:41 +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 v4 0/2] mm: add per-order mTHP alloc and swpout counters Content-Language: en-GB To: Barry Song <21cnbao@gmail.com>, Andrew Morton , david@redhat.com Cc: linux-mm@kvack.org, cerasuolodomenico@gmail.com, chrisl@kernel.org, kasong@tencent.com, peterx@redhat.com, surenb@google.com, v-songbaohua@oppo.com, willy@infradead.org, yosryahmed@google.com, yuzhao@google.com, linux-kernel@vger.kernel.org References: <20240405102704.77559-1-21cnbao@gmail.com> <20240405131140.8881aae1af0d877dc70c8ea9@linux-foundation.org> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 05/04/2024 23:04, Barry Song wrote: > On Sat, Apr 6, 2024 at 9:11 AM Andrew Morton wrote: >> >> On Fri, 5 Apr 2024 23:27:02 +1300 Barry Song <21cnbao@gmail.com> wrote: >> >>> The patchset introduces a framework to facilitate mTHP counters, starting >>> with the allocation and swap-out counters. Currently, only four new nodes >>> are appended to the stats directory for each mTHP size. >>> >>> /sys/kernel/mm/transparent_hugepage/hugepages-/stats >>> anon_alloc >>> anon_alloc_fallback >>> anon_swpout >>> anon_swpout_fallback >> >> Please let's get these documented? > > Sure, I will do it. > > Furthermore, after careful consideration, I suggest renaming anon_alloc to > anon_fault_alloc and anon_alloc_fallback to anon_fault_fallback. This > renaming is consistent with the naming convention observed in > thp_fault_alloc and thp_fault_fallback in vmstat. Additionally, this > modification will facilitate the handling of large folio swap-ins. > > /sys/kernel/mm/transparent_hugepage/hugepages-/stats > anon_fault_alloc, > anon_fault_fallback, > anon_swpin_alloc, > anon_swpin_fallback, > > Otherwise, without this renaming, it would be difficult to > differentiate fault_alloc > from swpin_alloc. > > Hi David, Ryan, > I would also appreciate your input on the modification I am considering. Yes, this makes sense to me! > >> Documentation/admin-guide/mm/transhuge.rst seems to be the place, and >> under Documentation/ABI. > > Thanks > Barry