Thread (32 messages) flat view 32 messages, 8 authors, 2020-07-24

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2020-07-23 22:34:27
Also in: linux-mm, linux-riscv, lkml

On Thu, 2020-07-23 at 01:21 -0400, Alex Ghiti wrote:
quoted
works fine with huge pages, what is your problem there ? You rely on
punching small-page size holes in there ?
ARCH_HAS_STRICT_KERNEL_RWX prevents the use of a hugepage for the kernel 
mapping in the direct mapping as it sets different permissions to 
different part of the kernel (data, text..etc).
Ah ok, that can be solved in a couple of ways...

One is to use the linker script to ensure those sections are linked
HUGE_PAGE_SIZE appart and moved appropriately by early boot code. One
is to selectively degrade just those huge pages.

I'm not familiar with the RiscV MMU (I should probably go have a look)
but if it's a classic radix tree with huge pages at PUD/PMD level, then
you could just degrade the one(s) that cross those boundaries.

Cheers,
Ben.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help