Messages in this thread | | | Date | Tue, 11 Aug 2020 00:47:34 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH V6 01/16] perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE |
| |
On Mon, Aug 10, 2020 at 06:38:35PM -0400, Liang, Kan wrote: > On 8/10/2020 5:47 PM, Dave Hansen wrote:
> > It's probably best if we very carefully define up front what is getting > > reported here. For instance, I believe we already have some fun cases > > with huge tmpfs where a compound page is mapped with 4k PTEs. Kirill > > also found a few drivers doing this as well. I think there were also > > some weird cases for ARM hugetlbfs where there were multiple hardware > > page table entries mapping a single hugetlbfs page. These would be > > cases where compound_head() size would be greater than the size of the > > leaf paging structure entry. > > > > This is also why we have KerelPageSize and MMUPageSize in /proc/$pid/smaps. > > > > So, is this returning the kernel software page size or the MMU size? > > > > This tries to return the kernel software page size. I will add a commit to > the function. For the above cases, I think they can be detected by > PageCompound(page). The current code should already cover them. Is my > understanding correct?
But the rationale for the whole feature was to measure and possibly drive large page promotion/demotion, which requires the mmu page-size.
| |