1 .. SPDX-License-Identifier: GPL-2.0 2 3 ========== 4 Device DAX 5 ========== 6 7 The device-dax interface uses the tail dedupli 8 Documentation/mm/vmemmap_dedup.rst 9 10 On powerpc, vmemmap deduplication is only used 11 with a 64K page size, only the devdax namespac 12 deduplication. 13 14 With 2M PMD level mapping, we require 32 struc 15 page can contain 1024 struct pages (64K/sizeof 16 vmemmap deduplication possible. 17 18 With 1G PUD level mapping, we require 16384 st 19 vmemmap page can contain 1024 struct pages (64 20 require 16 64K pages in vmemmap to map the str 21 22 Here's how things look like on device-dax afte 23 +-----------+ ---virt_to_page---> +---------- 24 | | | 0 25 | | +---------- 26 | | | 1 27 | | +---------- 28 | | | 2 29 | | +---------- 30 | | | 3 31 | | +---------- 32 | | | 4 33 | PUD | +---------- 34 | level | | . 35 | mapping | +---------- 36 | | | . 37 | | +---------- 38 | | | 15 39 | | +---------- 40 | | 41 | | 42 | | 43 +-----------+ 44 45 46 With 4K page size, 2M PMD level mapping requir 47 4K vmemmap page contains 64 struct pages(4K/si 48 require 8 4K pages in vmemmap to map the struc 49 50 Here's how things look like on device-dax afte 51 52 +-----------+ ---virt_to_page---> +---------- 53 | | | 0 54 | | +---------- 55 | | | 1 56 | | +---------- 57 | | | 2 58 | | +---------- 59 | | | 3 60 | | +---------- 61 | | | 4 62 | PMD | +---------- 63 | level | | 5 64 | mapping | +---------- 65 | | | 6 66 | | +---------- 67 | | | 7 68 | | +---------- 69 | | 70 | | 71 | | 72 +-----------+ 73 74 With 1G PUD level mapping, we require 262144 s 75 vmemmap page can contain 64 struct pages (4K/s 76 require 4096 4K pages in vmemmap to map the st 77 mapping. 78 79 Here's how things look like on device-dax afte 80 81 +-----------+ ---virt_to_page---> +---------- 82 | | | 0 83 | | +---------- 84 | | | 1 85 | | +---------- 86 | | | 2 87 | | +---------- 88 | | | 3 89 | | +---------- 90 | | | 4 91 | PUD | +---------- 92 | level | | . 93 | mapping | +---------- 94 | | | . 95 | | +---------- 96 | | | 4095 97 | | +---------- 98 | | 99 | | 100 | | 101 +-----------+
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.