Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153504413
D25187.id72824.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25187.id72824.diff
View Options
Index: sys/amd64/amd64/pmap.c
===================================================================
--- sys/amd64/amd64/pmap.c
+++ sys/amd64/amd64/pmap.c
@@ -3785,6 +3785,19 @@
* one or two pages may be held during the wait, only to be released
* afterwards. This conservative approach is easily argued to avoid
* race conditions.
+ *
+ * Page table entry at address va page index is defined as follows:
+ * - for page table (last level), ptepindex = pmap_pde_pindex(va) =
+ * = va >> PDRSHIFT, in other words, it is just the index of the PDE.
+ * - for page directory page, ptepindex = NUPDE (number of userland PD
+ * entries) + (pmap_pde_index(va) >> NPDEPGSHIFT)
+ * i.e. index of PDPE is put after the last index of PDE,
+ * - for page directory pointer page, ptepindex = NUPDE + NUPDPE +
+ * (pmap_pde_index(va) >> (NPDEPGSHIFT + NPML4EPGSHIFT),
+ * i.e. index of pml4e is put after the last index of PDPE.
+ * In other words, is it sequential number of the corresponding paging entry
+ * in the order where all entries of the same rank are put together, then
+ * ranks are put from deepest to root.
*/
static vm_page_t
_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 12:23 PM (47 m, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31978701
Default Alt Text
D25187.id72824.diff (1 KB)
Attached To
Mode
D25187: amd64 pmap: explain pteindex
Attached
Detach File
Event Timeline
Log In to Comment