Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.35k stars 169 forks source link

[Feature Request] Add Nest patch for 5.15 #597

Open X33R00 opened 2 years ago

X33R00 commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it.

Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler)

Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

X33R00 commented 2 years ago

it fails to patch in 5.19

-> ###################################################### -> -> Applying your own linux-5.19 patch /home/x33r00/compile/linux-tkg/linux519-tkg-userpatches/Nestv5.15.mypatch -> -> ###################################################### The next patch would create the file .scmversion, which already exists! Skipping patch. 1 out of 1 hunk ignored patching file arch/x86/kernel/smpboot.c Hunk #1 FAILED at 2182. 1 out of 1 hunk FAILED -- saving rejects to file arch/x86/kernel/smpboot.c.rej patching file include/linux/sched.h Hunk ##1 succeeded at 723 (offset 3 lines). Hunk ##2 FAILED at 778. 1 out of 2 hunks FAILED -- saving rejects to file include/linux/sched.h.rej patching file include/linux/sched/topology.h Hunk ##1 FAILED at 74. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/sched/topology.h.rej patching file kernel/sched/core.c Hunk ##1 succeeded at 2593 (offset 99 lines). Hunk ##2 succeeded at 3507 (offset 99 lines). Hunk ##3 succeeded at 3735 (offset 99 lines). Hunk ##4 succeeded at 3749 (offset 99 lines). Hunk ##5 succeeded at 4206 (offset 107 lines). Hunk ##6 succeeded at 4636 (offset 191 lines). Hunk ##7 succeeded at 4651 (offset 191 lines). Hunk ##8 succeeded at 4971 (offset 222 lines). Hunk ##9 succeeded at 5464 (offset 218 lines). Hunk ##10 succeeded at 6499 with fuzz 2 (offset 182 lines). Hunk ##11 succeeded at 8204 (offset 122 lines). Hunk ##12 succeeded at 9711 (offset 296 lines). Hunk ##13 succeeded at 9768 (offset 296 lines). patching file kernel/sched/fair.c Hunk ##1 succeeded at 3427 (offset 49 lines). Hunk ##2 succeeded at 6299 (offset 89 lines). Hunk ##3 succeeded at 6355 (offset 89 lines). Hunk ##4 FAILED at 6367. Hunk ##5 succeeded at 6508 with fuzz 1 (offset 101 lines). Hunk ##6 succeeded at 6595 (offset 101 lines). Hunk ##7 succeeded at 6693 with fuzz 1 (offset 98 lines). Hunk ##8 succeeded at 7057 (offset 3 lines). Hunk ##9 succeeded at 7079 (offset 3 lines). Hunk ##10 succeeded at 7249 (offset 8 lines). 1 out of 10 hunks FAILED -- saving rejects to file kernel/sched/fair.c.rej patching file kernel/sched/idle.c Hunk ##1 succeeded at 259 (offset -3 lines). patching file kernel/sched/sched.h Hunk ##2 succeeded at 1362 (offset -9 lines). ==> ERROR: A failure occurred in prepare(). Aborting... -> exit cleanup done

compicat commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it.

Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler)

Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

ptr1337 commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it. Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler) Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

Actually you find for 5.19/6.0 a working patchset at cachyos. Actually to get NEST working, you need your start you application with taskset, so that a affinity is set.

https://github.com/CachyOS/kernel-patches/blob/master/5.19/sched/0001-NEST.patch https://github.com/CachyOS/kernel-patches/blob/master/6.0/sched/0001-NEST.patch

Maybe these can be also simply on 5.15 applied. The patchset also boots

ptr1337 commented 2 years ago

Latency nice needs a backend, actually we have implemented that into ananicy-cpp

compicat commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it. Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler) Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

Actually you find for 5.19/6.0 a working patchset at cachyos. Actually to get NEST working, you need your start you application with taskset, so that a affinity is set.

https://github.com/CachyOS/kernel-patches/blob/master/5.19/sched/0001-NEST.patch https://github.com/CachyOS/kernel-patches/blob/master/6.0/sched/0001-NEST.patch

Maybe these can be also simply on 5.15 applied. The patchset also boots

These are not patching 5.15. They give errors.

Below patch is patching 5.15 without error, but no boot unfortunately.

https://raw.githubusercontent.com/CachyOS/kernel-patches/3c84693056ff61e4430a4a54556e6aeb7c261cfe/5.15/0001-NEST.patch

ptr1337 commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it. Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler) Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

Actually you find for 5.19/6.0 a working patchset at cachyos. Actually to get NEST working, you need your start you application with taskset, so that a affinity is set. https://github.com/CachyOS/kernel-patches/blob/master/5.19/sched/0001-NEST.patch https://github.com/CachyOS/kernel-patches/blob/master/6.0/sched/0001-NEST.patch Maybe these can be also simply on 5.15 applied. The patchset also boots

These are not patching 5.15. They give errors.

Below patch is patching 5.15 without error, but no boot unfortunately.

https://raw.githubusercontent.com/CachyOS/kernel-patches/3c84693056ff61e4430a4a54556e6aeb7c261cfe/5.15/0001-NEST.patch

Yeah. 5.19 and 6.0 are working fine. I have not tested 5.15, cause I dont have a personal use for. I just got it correctly working and booting for 5.19/6.0.

https://github.com/CachyOS/kernel-patches/commit/5d464d2e5e1889f810bd6209f38635407409c773#diff-54b45a455f42de54d7133ad72b920f99fc291460306c31a59ef3a4b23b4df6a3

Maybe this 5.15 does compile, but also not tested. May you need to revert the p->thread_info back, if it not compiles. Just ported them from 6.0 to 5.15

compicat commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it. Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler) Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

Actually you find for 5.19/6.0 a working patchset at cachyos. Actually to get NEST working, you need your start you application with taskset, so that a affinity is set. https://github.com/CachyOS/kernel-patches/blob/master/5.19/sched/0001-NEST.patch https://github.com/CachyOS/kernel-patches/blob/master/6.0/sched/0001-NEST.patch Maybe these can be also simply on 5.15 applied. The patchset also boots

These are not patching 5.15. They give errors. Below patch is patching 5.15 without error, but no boot unfortunately. https://raw.githubusercontent.com/CachyOS/kernel-patches/3c84693056ff61e4430a4a54556e6aeb7c261cfe/5.15/0001-NEST.patch

Yeah. 5.19 and 6.0 are working fine. I have not tested 5.15, cause I dont have a personal use for. I just got it correctly working and booting for 5.19/6.0.

CachyOS/kernel-patches@5d464d2#diff-54b45a455f42de54d7133ad72b920f99fc291460306c31a59ef3a4b23b4df6a3

Maybe this 5.15 does compile, but also not tested. May you need to revert the p->thread_info back, if it not compiles. Just ported them from 6.0 to 5.15

Yes, they are working flawless with linux 6.0. I will be checking your last share for 5.15 and will report. Thank you.

compicat commented 2 years ago

Before reporting an issue, please check for relevant keywords in the issues search bar, including closed issues. The solution to your issue might be there already ! I searched both in the issues and pull requests section and didnt find anyone talking about it. Describe the Feature There is currently a patch for the Nest scheduler (Its an improvement to the current CFS Scheduler) Here is the pdf slide if you are interested: https://lpc.events/event/16/contributions/1198/attachments/983/1909/plumbers.pdf And here is the patch for 5.15, i will try and see if it can be patched to 5.19: https://gitlab.inria.fr/nest-public/nest-artifact/-/raw/main/extras/Nest_v5.15_patch?inline=false

Unfortunately this patch is broken for 5.15, I ve tried manually patching several times and it is not booting even kernel becomes successfully patched. It is possible to use nest and latency-nice patches together with newest linux kernel 6.0 according to my experience.

Actually you find for 5.19/6.0 a working patchset at cachyos. Actually to get NEST working, you need your start you application with taskset, so that a affinity is set. https://github.com/CachyOS/kernel-patches/blob/master/5.19/sched/0001-NEST.patch https://github.com/CachyOS/kernel-patches/blob/master/6.0/sched/0001-NEST.patch Maybe these can be also simply on 5.15 applied. The patchset also boots

These are not patching 5.15. They give errors. Below patch is patching 5.15 without error, but no boot unfortunately. https://raw.githubusercontent.com/CachyOS/kernel-patches/3c84693056ff61e4430a4a54556e6aeb7c261cfe/5.15/0001-NEST.patch

Yeah. 5.19 and 6.0 are working fine. I have not tested 5.15, cause I dont have a personal use for. I just got it correctly working and booting for 5.19/6.0.

CachyOS/kernel-patches@5d464d2#diff-54b45a455f42de54d7133ad72b920f99fc291460306c31a59ef3a4b23b4df6a3

Maybe this 5.15 does compile, but also not tested. May you need to revert the p->thread_info back, if it not compiles. Just ported them from 6.0 to 5.15

Thanks for amazing work. NEST is finally booting with 5.15. As you have mentioned, pthread lines should be reverted for 5.15.

"taskset -c 0-23" pre command is ok for making it work, right?

ptr1337 commented 2 years ago

To the task needs to be a affinity set, so that the expand mask is enabled. So taskset -c 0-23 $application means that 24 threads are used for the task, simply replace this with the threads you have with your cpu. At Steam I used for example taskset -c 0-23 %command% at the launch option, to start games with NEST.

I will fix tomorrow the patch then, so that there is a working NEST also for 5.15.

compicat commented 2 years ago

taskset -c 0-23 %command%

Thank you again. I confim it is working. Just to clarify taskset thing, so in my system i will use 0-7 (2x4), right?

sad

ptr1337 commented 2 years ago

taskset -c 0-23 %command%

Thank you again. I confim it is working. Just to clarify taskset thing, so in my system i will use 0-7 (2x4), right?

sad

As long hyperthreading is enabled (should be), correct :)

compicat commented 2 years ago

taskset -c 0-23 %command%

Thank you again. I confim it is working. Just to clarify taskset thing, so in my system i will use 0-7 (2x4), right? sad

As long hyperthreading is enabled (should be), correct :)

Thanks for all your kind help and prompt replies again :)