mm: add statistics for PUD level pagetable
Recently, we found that cross-die access to pagetable pages on ARM64
machines can cause performance fluctuations in our business. Currently,
there are no PMU events available to track this situation on our ARM64
machines, so accurate pagetable accounting can help to analyze this issue,
but now the PUD level pagetable accounting is missed.
So introduce pagetable_pud_ctor/dtor() to help to get accurate PUD
pagetable accounting, as well as converting the architectures which use
generic PUD pagetable allocation to add corresponding PUD pagetable
accounting. Moreover this patch will mark the PUD level pagetable with
PG_table flag, which will help to do sanity validation in
unpoison_memory().
On my testing machine, I can see more pagetables statistics after the patch
with page-types tool:
Before patch:
flags page-count MB symbolic-flags long-symbolic-flags
0x0000000004000000 27326 106 _________g pgtable
After patch:
0x0000000004000000 27541 107 _________g pgtable
Link: https://lkml.kernel.org/r/876c71c03a7e69c17722a690e3225a4f7b172fb2.1695017383.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang baolin.wang@linux.alibaba.com
Acked-by: Mike Rapoport (IBM) rppt@kernel.org
Acked-by: Vishal Moola (Oracle) vishal.moola@gmail.com
Cc: Andy Lutomirski luto@kernel.org
Cc: Aneesh Kumar K.V aneesh.kumar@linux.ibm.com
Cc: Arnd Bergmann arnd@arndb.de
Cc: Borislav Petkov bp@alien8.de
Cc: Catalin Marinas catalin.marinas@arm.com
Cc: Dave Hansen dave.hansen@linux.intel.com
Cc: Huacai Chen chenhuacai@kernel.org
Cc: Ingo Molnar mingo@redhat.com
Cc: Matthew Wilcox (Oracle) willy@infradead.org
Cc: Nicholas Piggin npiggin@gmail.com
Cc: Peter Zijlstra peterz@infradead.org
Cc: Thomas Bogendoerfer tsbogend@alpha.franken.de
Cc: Thomas Gleixner tglx@linutronix.de
Cc: Will Deacon will@kernel.org
Signed-off-by: Andrew Morton akpm@linux-foundation.org
[ Backport from v6.7-rc1 ]
Signed-off-by: WangYuli wangyuli@uniontech.com
Linux kernel
There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.
In order to build the documentation, use
make htmldocs
ormake pdfdocs
. The formatted documentation can also be read online at:There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.