Approved: Fortect
In the past few days, some of our users have come across an error message regarding Linux kernel page resizing. There are a number of factors that can cause this problem. Let’s discuss this now.
I would like to redeem PAGE_SIZE
from 4096
for experience. So I changed the value of PAGE_SHIFT
during /arch/x86/include/asm/page_types.h
. But Ican’t compile this.
In the file counted by include / linux / linking.h: 4: 0,from include / linux / kernel.h: 6,from include / linux / cache.h: 4,from include / linux / time.h: 4,from ark / x86 / kernel / vsyscall_64.c: 23:arch / x86 / kernel / vsyscall_64.c: reason for "map_vsyscall" † ...:include / linux / compiler.h: 437: 20: eroor: Call "compiletime_assert_390" with error attribute declared: failed BUILD_BUG_ON: (long unsigned) __ fix_to_virt (VVAR_PAGE)! = (long unsigned) VVAR_ADDRESSPrefix Suffix (); n^include / linux / compiler.Note: h: 442: 2: Living in the "__compiletime_assert" macro extension__compiletime_assert (condition, message, prefix, suffix)^include / linux / compiler.h: 454: 2: Note: refers to "_compiletime_assert" in an extension macro_compiletime_assert (condition, message, __compiletime_assert_, __LINE)^include / linux / bug.h: 53: 37: Note: in an extension that includes the "compiletime_assert" macro#define BUILD_BUG_ON_MSG (cond, msg) msg)^include / linux / bug compiletime_assert (! (cond), .h: 77: 2: know: in the "BUILD_BUG_ON_MSG" macro extensionBUILD_BUG_ON_MSG (condition, "BUILD_BUG_ON failed: # condition)^Arch / x86 / kernel / vsyscall_64 ".c: 389: 2: Note: in extension with macro" BUILD_BUG_ON "BUILD_BUG_ON ((unsigned! =^make [2]: long) __ fix_to_virt (VVAR_PAGE) * [arch / x86 / kernel / vsycall_64.o] eroor 1make [1]: * [arch / x86 / kernel] Error 2make: *** [arch / x86] error message 2
Probably because of VVAR_PAGE, on the contrary, I am nothow to change it.What if I do this?
asked me on Dec 13 ’19 at 6:32
1
Not The Answer You Are Looking For? Browse Other Questions Tagged As Linux Kernel Paging And Ask Your Own Question.
Cannot modify PAGE_SIZE
directly by setting PAGE_SHIFT
because it was generated at compile time.
Assuming your processor is a specific x86 processor, you can resize the page to 8KB using the family in CONFIG_PAGE_SIZE_XXX
variables such as CONFIG_PAGE_SIZE_8KB
. Please note that using large pages takes up a lot of space, because even aboutOne-byte documentation takes up an entire page on your hard drive. Also, page changes are architecture size dependent and it is often recommended to leave it at the default 4K size.
However, a better approach may be to use larger, more varied and powerful pages. They are described there
answered Dec 13 ’19 at 8:49
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
946
Speed up your computer's performance now with this simple download.