From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24936221475 for ; Fri, 20 Dec 2024 17:45: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=1734716713; cv=none; b=QVwTlZusbEs951X/g4B2ChOGTXd18htwiPgXTnq/yLVJAGkhu+ydIsyf5WeLNJE3+XH+1isOjLlVHDDBKrtJ1ed2/XEmPar+/dQzmYODMrZj4WSueIS/IMCJtffZIGWHgHUiyjwkL+lbRjgcWJF3vboZxXHdg+lmyGu0eqRBA+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734716713; c=relaxed/simple; bh=eRHXxm0gMui06kCdCs14vUTk1U+ag2PtCGuCpX3ddww=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uMZNRTpHdLLY2RMjExMYiSvUrjbew8Fkl3VwFhIFwpwPYbiEwWowOGIo0TUI0P7fxb4KwK2UqlMSoKi4SbuQVi/uMwu7JtwLBPejS4HUMTmFoHafMSUrN2d2T9FqEINsSSRE0rIMWrvWEclF6IddKzpzgdJg58aUjA5rnnftfP4= 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 6B5BB1480; Fri, 20 Dec 2024 09:45:38 -0800 (PST) Received: from [10.57.92.231] (unknown [10.57.92.231]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 122633F720; Fri, 20 Dec 2024 09:45:05 -0800 (PST) Message-ID: Date: Fri, 20 Dec 2024 17:45:04 +0000 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: [RFC PATCH 02/12] khugepaged: Generalize alloc_charge_folio() Content-Language: en-GB To: "Christoph Lameter (Ampere)" Cc: Matthew Wilcox , Dev Jain , akpm@linux-foundation.org, david@redhat.com, kirill.shutemov@linux.intel.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, vbabka@suse.cz, mhocko@suse.com, apopple@nvidia.com, dave.hansen@linux.intel.com, will@kernel.org, baohua@kernel.org, jack@suse.cz, srivatsa@csail.mit.edu, haowenchao22@gmail.com, hughd@google.com, aneesh.kumar@kernel.org, yang@os.amperecomputing.com, peterx@redhat.com, ioworker0@gmail.com, wangkefeng.wang@huawei.com, ziy@nvidia.com, jglisse@google.com, surenb@google.com, vishal.moola@gmail.com, zokeefe@google.com, zhengqi.arch@bytedance.com, jhubbard@nvidia.com, 21cnbao@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20241216165105.56185-1-dev.jain@arm.com> <20241216165105.56185-3-dev.jain@arm.com> <5e716fd3-2393-8d41-bb68-9f589e4db290@gentwo.org> From: Ryan Roberts In-Reply-To: <5e716fd3-2393-8d41-bb68-9f589e4db290@gentwo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20/12/2024 17:41, Christoph Lameter (Ampere) wrote: > On Tue, 17 Dec 2024, Ryan Roberts wrote: > >> We previously decided that all existing THP stats would continue to only count >> PMD-sized THP for fear of breaking userspace in subtle ways, and instead would >> introduce new mTHP stats that can count for each order. We already have >> MTHP_STAT_ANON_FAULT_ALLOC and MTHP_STAT_ANON_FAULT_FALLBACK (amongst others) so >> these new stats fit the pattern well, IMHO. > > Could we move all the stats somewhere into sysfs where we can get them by > page order? /proc/vmstat keeps getting new counters. This is exactly what has been done already for mthp stats. They live at: /sys/kernel/mm/transparent_hugepage/hugepages-kB/stats/. So there is a directory per size, and there is a file per stat.