Frogging-Family / linux-tkg

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

PREEMPT_RT patch conflicts with BORE patch on v6.6.20 #900

Closed blackteahamburger closed 7 months ago

blackteahamburger commented 8 months ago

PREEMPT_RT patch conflicts with BORE patch on v6.6.20, BORE patch is failed to apply.

/root/.config/frogminer/linux-tkg.cfg (part):

_distro="Gentoo"
_version="6.6.20"
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
_cpusched="bore"
_preempt_rt="1"
_preempt_rt_force=""
# ./install.sh config
 -> External configuration file /root/.config/frogminer/linux-tkg.cfg will be used and will override customization.cfg values.
 -> Checking out user-defined kernel version : 6.6.20
...
 -> Using Arch patches
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 28863  100 28863    0     0  25545      0  0:00:01  0:00:01 --:--:-- 25565
 -> Applying graysky's cpu opts patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  105k  100  105k    0     0  78727      0  0:00:01  0:00:01 --:--:-- 78778
 -> Applying PREEMPT_RT patch
 -> Applying clear linux patches
 -> Applying glitched base patch
 -> RPM: fixing spec generator
 -> Applying misc additions patch
 -> Applying patches for WRITE_WATCH support in Wine
 -> Applying patches for WRITE_WATCH support in Wine
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 27473  100 27473    0     0  26681      0  0:00:01  0:00:01 --:--:-- 26698
 -> Applying BORE patch
 ==> ERROR: An error was encountered applying patches. It was logged to the prepare.log.txt file.
 -> Applying Glitched CFS/EEVDF patch

prepare.log.txt:

...
### Applying 0001-bore.patch... ###
patching file include/linux/sched.h
patching file init/Kconfig
Hunk #1 succeeded at 1315 (offset 57 lines).
patching file kernel/sched/core.c
Hunk #1 succeeded at 4508 (offset 20 lines).
Hunk #2 succeeded at 4661 (offset 20 lines).
Hunk #3 succeeded at 4983 (offset 20 lines).
Hunk #4 succeeded at 10138 (offset 73 lines).
patching file kernel/sched/debug.c
Hunk #3 succeeded at 409 (offset 17 lines).
Hunk #4 succeeded at 666 (offset 19 lines).
Hunk #5 succeeded at 1142 (offset 19 lines).
patching file kernel/sched/fair.c
Hunk #17 FAILED at 1390.
Hunk #18 succeeded at 5312 (offset 16 lines).
Hunk #19 succeeded at 5375 (offset 16 lines).
Hunk #20 succeeded at 6938 (offset 16 lines).
Hunk #21 succeeded at 8677 (offset 16 lines).
Hunk #22 succeeded at 12772 (offset 16 lines).
1 out of 22 hunks FAILED -- saving rejects to file kernel/sched/fair.c.rej
patching file kernel/sched/features.h
patching file kernel/sched/sched.h
Hunk #2 succeeded at 2530 (offset 1 line).
...

fair.c.rej:

--- kernel/sched/fair.c
+++ kernel/sched/fair.c
@@ -1390,7 +1607,13 @@ static void update_curr(struct cfs_rq *cfs_rq)
        curr->sum_exec_runtime += delta_exec;
        schedstat_add(cfs_rq->exec_clock, delta_exec);

+#ifdef CONFIG_SCHED_BORE
+       curr->burst_time += delta_exec;
+       update_burst_penalty(curr);
+       curr->vruntime += max(1ULL, calc_delta_fair(delta_exec, curr));
+#else // !CONFIG_SCHED_BORE
        curr->vruntime += calc_delta_fair(delta_exec, curr);
+#endif // CONFIG_SCHED_BORE
        update_deadline(cfs_rq, curr);
        update_min_vruntime(cfs_rq);

Only occurs when setting _cpusched="bore" and _preempt_rt="1" at the same time

Tk-Glitch commented 7 months ago

Both BORE and RT patches are external to this repo, so #wontfix on our end.

blackteahamburger commented 7 months ago

Then can you consider removing bore (and bore-eevdf?) in _avail_cpu_scheds_rt in linux-tkg-config/prepare?

Tk-Glitch commented 7 months ago

Done with https://github.com/Frogging-Family/linux-tkg/commit/31328eb71b3e1ffa126ef722973ae956927818a9