utsaslab / WineFS

WineFS (SOSP 21): a huge-page aware file system for persistent memory
34 stars 2 forks source link

"sched_setaffinity" [fs/winefs/winefs.ko] undefined! #10

Open YozoraHoshifuru opened 2 years ago

YozoraHoshifuru commented 2 years ago

Hello! I'd like to dynamically load WineFS, thus I ran the command make menuconfig and modified the * in the option box of DuoFS to M after running cp CONFIG_WINEFS .config and make olddefconfig. However, when I compiled and installed the Linux kernel 5.1 in Linux-5.1/ directory, the error like this occurs:

ERROR: "sched_setaffinity" [fs/winefs/winefs.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1266: recipe for target 'modules' failed
make: *** [modules] Error 2

image image Here are the figures showing that I have modified the * in the option box of DuoFS to M in menuconfig. If I want to dynamically load WineFS instead of build it into the kernel, how should I modify the CONFIG_WINEFS or menuconfig? Looking forward to your reply! Thanks!

rohankadekodi commented 2 years ago

Hello!

If you are running WineFS on a single NUMA node, you can just comment out the sched_setaffinity() statements in WineFS and load WineFS as a module. Basically comment out these lines:

  1. https://github.com/utsaslab/WineFS/blob/main/Linux-5.1/fs/winefs/xip.c#L702
  2. https://github.com/utsaslab/WineFS/blob/main/Linux-5.1/fs/winefs/xip.c#L1159

However, if you are running WineFS on multiple NUMA nodes and want to use the NUMA affinity feature of WineFS, then it must be built-in into the linux kernel, as the sched_setaffinity() statements which can only be used by built-in modules help in migrating threads to the cores of the NUMA node where the data resides.