Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <si.yanteng@linux.dev>
Signed-off-by: Pengyu Zhang <zpenya1314@gmail.com>
Link: https://lore.kernel.org/r/20241016141801.25487-4-zpenya1314@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Pengyu Zhang and committed by
Jonathan Corbet
53e52302 a1b44f9b

+1 -1
+1 -1
Documentation/translations/zh_CN/mm/page_tables.rst
··· 32 32 在页粒度为 4KB 且地址范围为32位的情况下,pfn 0 对应地址0x00000000,pfn 1 对应 33 33 地址0x00001000,pfn 2 对应地址 0x00002000,以此类推,直到 pfn 0xfffff 对应 34 34 0xfffff000。如果页粒度为 16KB,则 pfn 分别对应地址 0x00004000、0x00008000 35 - ... 0xffffc000,pfn 的范围从 0 到 0x3fffff。 35 + ... 0xffffc000,pfn 的范围从 0 到 0x3ffff。 36 36 37 37 如你所见,对于 4KB 页面粒度,页基址使用地址的 12-31 位,这就是为什么在这种情况下 38 38 `PAGE_SHIFT` 被定义为 12,并且 `PAGE_SIZE` 通常由页偏移定义,为 `(1 << PAGE_SHIFT)`。