I have a requirement of forcing the
PMD levels of the page-table to be updated or in other words, to make the process frequently hold the
PTE locks. This is for research purposes.
I know this could be done in one of two ways:
mmap, touch the allocated memory (to allocate a physical memory), and then
munmapupdate the page-table. But I don’t know how to make this allocation/deallocation touch both tables.
Allocate a memory using
mmaplike above, and frequently relocate the memory in such a way that modifies both
PTElevels. For this, I couldn’t find a way to move pages to a new location that causes both tables to be updated.
So my question is, how to allocate or relocate a mapped memory in such a way that both the
PMD tables are updated? I presume any solution based on the above is a matter of finding a proper virtual address to map to or relocate to.
My processor is an Intel Xeon Gold 6142 with 4 levels page table.