Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
compile the kernel but error due to mm/vmscan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nenoro
n00b
n00b


Joined: 07 Jan 2018
Posts: 55

PostPosted: Sat Mar 23, 2024 5:08 pm    Post subject: compile the kernel but error due to mm/vmscan Reply with quote

Hello

So i wanted to compile the kernel and it has been a while i'm stuck with the 6.6.8 because above this version i have an error i can't figure out or on internet.

Code:
mm/vmscan.c: In function ‘shrink_node’:
mm/vmscan.c:6053:9: error: implicit declaration of function ‘prepare_workingset_protection’ [-Werror=implicit-function-declaration]
 6053 |         prepare_workingset_protection(pgdat, sc);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:6145:17: error: implicit declaration of function ‘invoke_oom’ [-Werror=implicit-function-declaration]
 6145 |                 invoke_oom(sc);
      |                 ^~~~~~~~~~
mm/vmscan.c: At top level:
mm/vmscan.c:201:12: warning: ‘workingset_protection_prev_totalram’ defined but not used [-Wunused-variable]
  201 | static u64 workingset_protection_prev_totalram __read_mostly = 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:200:12: warning: ‘sysctl_clean_min_ratio_kb’ defined but not used [-Wunused-variable]
  200 | static u64 sysctl_clean_min_ratio_kb __read_mostly = 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:199:12: warning: ‘sysctl_clean_low_ratio_kb’ defined but not used [-Wunused-variable]
  199 | static u64 sysctl_clean_low_ratio_kb __read_mostly = 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
mm/vmscan.c:198:12: warning: ‘sysctl_anon_min_ratio_kb’ defined but not used [-Wunused-variable]
  198 | static u64 sysctl_anon_min_ratio_kb  __read_mostly = 0;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: mm/vmscan.o] Error 1
make[2]: *** [scripts/Makefile.build:481: mm] Error 2
make[2]: *** Waiting for unfinished jobs....



That is the issue i'm trying to find where is it in the nconfig

CPU: R7 5700x
RAM: 32 GB

i hope you won't ask me to do emerge --info since it's a kernel situation not compile a package.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21637

PostPosted: Sat Mar 23, 2024 5:26 pm    Post subject: Reply with quote

Please provide the output of head Makefile and a description of how you obtained the kernel source that fails. I checked v6.6.8, v6.6.9, v6.7, and v6.8.1; none of them have anything like that at mm/vmscan.c:6053. I even tried to git grep prepare_workingset and was not able to find a reference to it anywhere in the kernels I checked.
Back to top
View user's profile Send private message
nenoro
n00b
n00b


Joined: 07 Jan 2018
Posts: 55

PostPosted: Sat Mar 23, 2024 6:44 pm    Post subject: Reply with quote

Hu wrote:
Please provide the output of head Makefile and a description of how you obtained the kernel source that fails. I checked v6.6.8, v6.6.9, v6.7, and v6.8.1; none of them have anything like that at mm/vmscan.c:6053. I even tried to git grep prepare_workingset and was not able to find a reference to it anywhere in the kernels I checked.


V6.6.8 has no issue it's above i have this issue when i use xanmod.

For the makefile:
https://pastebin.com/T1HmNQ3W


Source or the kernel where i downloaded it:
https://gitlab.com/xanmod/linux/-/archive/6.8.1-xanmod1/linux-6.8.1-xanmod1.tar.gz

as for Zen kernel, no vmscan error, i should check with the people who are maintaining xanmod
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21637

PostPosted: Sat Mar 23, 2024 7:01 pm    Post subject: Reply with quote

As I said above, I checked v6.8.1 (Linus' release) and see no sign of the code that is failing for you. You said this also fails for the vanilla and gentoo kernels. How did you obtain the source for the broken versions of those?

Looking at the xanmod code, it is clear to me that this code is wrong. Whoever wrote the addition of prepare_workingset_protection clearly did it wrong. It is defined inside a preprocessor guarded block, but then unconditionally used. Either the preprocessor guard should not exclude the definition of this function, or the #else block should provide a stub definition, or the call to the function should itself be wrapped in a preprocessor guard. Without delving into how the xanmod sources were produced, I cannot comment on whether this is something that xanmod broke or if they copied someone else's broken work for use as a baseline.
Back to top
View user's profile Send private message
nenoro
n00b
n00b


Joined: 07 Jan 2018
Posts: 55

PostPosted: Sun Mar 31, 2024 4:17 pm    Post subject: Reply with quote

So you suggest to not use xanmod kernel but another kernel who doesn't have this issue ?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21637

PostPosted: Sun Mar 31, 2024 4:31 pm    Post subject: Reply with quote

Your choices are:
  • Use a kernel which lacks the broken code.
  • Enable the Kconfig symbol to define the missing function.
  • Fix the code. (No, I cannot tell you the right fix here.)
  • Report it as a bug to Xanmod, and hope they fix the code.
Back to top
View user's profile Send private message
nenoro
n00b
n00b


Joined: 07 Jan 2018
Posts: 55

PostPosted: Sun Mar 31, 2024 6:28 pm    Post subject: Reply with quote

noted

i use zen kernel, my first choice before
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum