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 D41BB194096 for ; Thu, 2 Jan 2025 11:21:23 +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=1735816885; cv=none; b=PcuLOIk74qNvSI0T9KW1UIXZwwQkk2/y/DCTv/tixM2Q1X+qyFwvj+/pZRK8hU+jNm7/im4MXrLXR+6ARFCooBVh2WxtJ0uzhisMgarlRakqIEYRux9wl8uEcowinhADpuogH0qp/PjJLY1eA4i865jt5PFx/zJsAc9vWOUUl8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735816885; c=relaxed/simple; bh=198DKW1n6Ebo9tNQflptqXc7iBVDEFkIG26k5hMzovo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TJB5PcSMkVoqXUVqZcSIzAJdu5A17X1BuIH6HXnQ0u4rLgJBel0GfDsMyB+/R0AErA5Ru6kG+CH2POu14w0bt3wFJxSsJrHTAM32a6k9uxPtmKmH5edAXrk2WeQ6ZMteiD+jTL85NYXyMoglhlvVSOgTGaJOMlnL2MQ7XI5c/WA= 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 263E011FB; Thu, 2 Jan 2025 03:21:51 -0800 (PST) Received: from [10.57.92.209] (unknown [10.57.92.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 47F0F3F59E; Thu, 2 Jan 2025 03:21:18 -0800 (PST) Message-ID: Date: Thu, 2 Jan 2025 11:21:16 +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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sorry I missed this before heading off for Christmas... On 20/12/2024 18:47, Christoph Lameter (Ampere) wrote: > On Fri, 20 Dec 2024, Ryan Roberts wrote: > >>> 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. > > Then lets drop all THP and huge page counters from vmstat. Previous discussion concluded that we can't remove counters from vmstat for fear of breaking user space. So the policy is that vmstat THP entries should remain, but they continue to only count PMD-sized THP. The PMD-sized THP counters are effectively duplicated at: /sys/kernel/mm/transparent_hugepage/hugepages-2048kB/stats/ (or whatever your PMD size happens to be). Thanks, Ryan