Skip to content

Commit 53e5230

Browse files
Pengyu ZhangJonathan Corbet
authored andcommitted
Docs/zh_CN: Fix the pfn calculation error in page_tables.rst
Synchronize the changes of origin document to fix the pfn value. Reviewed-by: Yanteng Si <[email protected]> Signed-off-by: Pengyu Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
1 parent a1b44f9 commit 53e5230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/translations/zh_CN/mm/page_tables.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Linux 将页表定义为一个分级结构,目前有五级。对于支持的
3232
在页粒度为 4KB 且地址范围为32位的情况下,pfn 0 对应地址0x00000000,pfn 1 对应
3333
地址0x00001000,pfn 2 对应地址 0x00002000,以此类推,直到 pfn 0xfffff 对应
3434
0xfffff000。如果页粒度为 16KB,则 pfn 分别对应地址 0x00004000、0x00008000
35-
... 0xffffc000,pfn 的范围从 0 到 0x3fffff
35+
... 0xffffc000,pfn 的范围从 0 到 0x3ffff
3636

3737
如你所见,对于 4KB 页面粒度,页基址使用地址的 12-31 位,这就是为什么在这种情况下
3838
`PAGE_SHIFT` 被定义为 12,并且 `PAGE_SIZE` 通常由页偏移定义,为 `(1 << PAGE_SHIFT)`。

0 commit comments

Comments
 (0)