From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13D75140E5F for ; Thu, 5 Mar 2026 03:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772680954; cv=none; b=Gkfv2By2nCGv+OW/XdcoCeVnU/+YW9+7ZHRZeDPwdfVlm7NE/L86LOqgXZzoBb+mmJUhFEiQ/KMFjuN1PhVIZ4UIizOu3nU3Wom4WNHIX6aBXca4h7i7PO3DTkS1flL4IFFCudsvz9tS4wBvGCR+gV+ex5nEK4D8wyHlfF0o1nA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772680954; c=relaxed/simple; bh=QZ0hNcuNlpQuyiiY34XUhZUoyz0Dwe6vjkiCfycRTck=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ENob60ujpb8jjlBKL4yKA1Zh5Rd11sGLg5LB/rrmlJcSx7LXKkCFvZGoJ8aZjQnLiLXQfo7zt7202lFpGvcN8uLb/6QJ7TaEKWgAjaTwNXt8lCf5V+sJ2s/lfFb6LJ1egfM1Kbeyi5bG1rumhRUwVR4cz3WADRqqfNAmWkqGrb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=nQqMSLj1; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="nQqMSLj1" Message-ID: <7ef528c1-b09c-48ba-bd59-bcf13880e105@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1772680923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gus2TbXg7gV4yotO25GDeDjmZGlpM2f+fKw3//D+yIA=; b=nQqMSLj1tjlyJYZMSeOMcrUjLwkiQXIkpZMDbTxUeW4EXdyaALv/totjOTniIeC6JO9Tb+ nN4dIP7ddh+mLx7p2xWqLpogvBGLmHMhocAyCiCv1LL/5YNEFVmKuNVnJMPakmyrjRGUCl GUGWZtENkEFZJXNvmDPtIT8tN+UUHNk= Date: Thu, 5 Mar 2026 11:21:51 +0800 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v1] docs: filesystems: clarify KernelPageSize vs. MMUPageSize in smaps To: "David Hildenbrand (Arm)" Cc: linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Dev Jain , Barry Song , Jonathan Corbet , linux-kernel@vger.kernel.org, Shuah Khan , Usama Arif , Andi Kleen References: <20260304155636.77433-1-david@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <20260304155636.77433-1-david@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2026/3/4 23:56, David Hildenbrand (Arm) wrote: > There was recently some confusion around THPs and the interaction with > KernelPageSize / MMUPageSize. Historically, these entries always > correspond to the smallest size we could encounter, not any current > usage of transparent huge pages or larger sizes used by the MMU. > > Ever since we added THP support many, many years ago, these entries > would keep reporting the smallest (fallback) granularity in a VMA. > > For this reason, they default to PAGE_SIZE for all VMAs except for > VMAs where we have the guarantee that the system and the MMU will > always use larger page sizes. hugetlb, for example, exposes a custom > vm_ops->pagesize callback to handle that. Similarly, dax/device > exposes a custom vm_ops->pagesize callback and provides similar > guarantees. > > Let's clarify the historical meaning of KernelPageSize / MMUPageSize, > and point at "AnonHugePages", "ShmemPmdMapped" and "FilePmdMapped" > regarding PMD entries. > > While at it, document "FilePmdMapped", clarify what the "AnonHugePages" > and "ShmemPmdMapped" entries really mean, and make it clear that there > are no other entries for other THP/folio sizes or mappings. > > Link: https://lore.kernel.org/all/20260225232708.87833-1-ak@linux.intel.com/ > Cc: Andrew Morton > Cc: Lorenzo Stoakes > Cc: Zi Yan > Cc: Baolin Wang > Cc: Liam R. Howlett > Cc: Nico Pache > Cc: Ryan Roberts Cc: Dev Jain > Cc: Barry Song > Cc: Lance Yang > Cc: Jonathan Corbet > Cc: Shuah Khan > Cc: Usama Arif > Cc: Andi Kleen > Signed-off-by: David Hildenbrand (Arm) > --- Makes sense to me. Feel free to add: Reviewed-by: Lance Yang