summaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx/clk-imx8mm.c
diff options
context:
space:
mode:
authorAlexandre Ghiti <alex@ghiti.fr>2021-02-08 20:30:17 +0100
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-02-23 03:54:17 +0100
commitd7fbcf40df86bb67193d9faf52138fc1202decb2 (patch)
tree52a24c60d68f48718e45e1b43ffccbb715c925df /drivers/clk/imx/clk-imx8mm.c
parentriscv: Improve kasan population function (diff)
downloadlinux-d7fbcf40df86bb67193d9faf52138fc1202decb2.tar.xz
linux-d7fbcf40df86bb67193d9faf52138fc1202decb2.zip
riscv: Improve kasan population by using hugepages when possible
The kasan functions that populates the shadow regions used to allocate them page by page and did not take advantage of hugepages, so fix this by trying to allocate hugepages of 1GB and fallback to 2MB hugepages or 4K pages in case it fails. This reduces the page table memory consumption and improves TLB usage, as shown below: Before this patch: ---[ Kasan shadow start ]--- 0xffffffc000000000-0xffffffc400000000 0x00000000818ef000 16G PTE . A . . . . R V 0xffffffc400000000-0xffffffc447fc0000 0x00000002b7f4f000 1179392K PTE D A . . . W R V 0xffffffc480000000-0xffffffc800000000 0x00000000818ef000 14G PTE . A . . . . R V ---[ Kasan shadow end ]--- After this patch: ---[ Kasan shadow start ]--- 0xffffffc000000000-0xffffffc400000000 0x00000000818ef000 16G PTE . A . . . . R V 0xffffffc400000000-0xffffffc440000000 0x0000000240000000 1G PGD D A . . . W R V 0xffffffc440000000-0xffffffc447e00000 0x00000002b7e00000 126M PMD D A . . . W R V 0xffffffc447e00000-0xffffffc447fc0000 0x00000002b818f000 1792K PTE D A . . . W R V 0xffffffc480000000-0xffffffc800000000 0x00000000818ef000 14G PTE . A . . . . R V ---[ Kasan shadow end ]--- Signed-off-by: Alexandre Ghiti <alex@ghiti.fr> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'drivers/clk/imx/clk-imx8mm.c')
0 files changed, 0 insertions, 0 deletions