From 008a7d556776995cad74de3c2064f5906ee4bcc4 Mon Sep 17 00:00:00 2001 From: Erwei Deng Date: Wed, 7 Dec 2022 19:15:43 +0800 Subject: [PATCH] sched: fix a bug of missing put_prev_task_fair Fix a bug and update the release. And rename the number of patches. Signed-off-by: Erwei Deng --- ...1001-sched-enable-the-group-identity.patch | 2 +- ... 1002-sched-resuce-dying-tasks-on-rq.patch | 2 +- ...003-sched-fix-sysfs-removed-too-late.patch | 2 +- ...> 1004-sched-work-around-AliSecGuard.patch | 2 +- ...d-fix-panic-when-CPU-hotplug-on-5.10.patch | 2 +- ...decar-of-smp.c-to-fix-the-scheduler_.patch | 2 +- ...s-put_prev_task-after-pick_next_task.patch | 34 +++++++++++++++++++ scheduler-group-identity.spec | 18 ++++++---- 8 files changed, 51 insertions(+), 13 deletions(-) rename 0001-sched-enable-the-group-identity.patch => 1001-sched-enable-the-group-identity.patch (99%) rename 0002-sched-resuce-dying-tasks-on-rq.patch => 1002-sched-resuce-dying-tasks-on-rq.patch (98%) rename 0003-sched-fix-sysfs-removed-too-late.patch => 1003-sched-fix-sysfs-removed-too-late.patch (96%) rename 0004-sched-work-around-AliSecGuard.patch => 1004-sched-work-around-AliSecGuard.patch (97%) rename 0005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch => 1005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch (96%) rename 0006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch => 1006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch (99%) create mode 100644 1007-sched-miss-put_prev_task-after-pick_next_task.patch diff --git a/0001-sched-enable-the-group-identity.patch b/1001-sched-enable-the-group-identity.patch similarity index 99% rename from 0001-sched-enable-the-group-identity.patch rename to 1001-sched-enable-the-group-identity.patch index 9a55d24..d575407 100644 --- a/0001-sched-enable-the-group-identity.patch +++ b/1001-sched-enable-the-group-identity.patch @@ -1,7 +1,7 @@ From bb436a218e495ddc7841a060cc80c362d9a7b430 Mon Sep 17 00:00:00 2001 From: Cruz Zhao Date: Mon, 5 Dec 2022 16:02:37 +0800 -Subject: [PATCH 1/6] sched: enable the group identity +Subject: [PATCH 1/7] sched: enable the group identity Signed-off-by: Erwei Deng Signed-off-by: Cruz Zhao diff --git a/0002-sched-resuce-dying-tasks-on-rq.patch b/1002-sched-resuce-dying-tasks-on-rq.patch similarity index 98% rename from 0002-sched-resuce-dying-tasks-on-rq.patch rename to 1002-sched-resuce-dying-tasks-on-rq.patch index cb51ad1..be64429 100644 --- a/0002-sched-resuce-dying-tasks-on-rq.patch +++ b/1002-sched-resuce-dying-tasks-on-rq.patch @@ -1,7 +1,7 @@ From 2474c655755e97a1e62c323c460e9cb983e48c7a Mon Sep 17 00:00:00 2001 From: Cruz Zhao Date: Mon, 5 Dec 2022 16:26:42 +0800 -Subject: [PATCH 2/6] sched: resuce dying tasks on rq +Subject: [PATCH 2/7] sched: resuce dying tasks on rq Signed-off-by: Cruz Zhao Signed-off-by: Erwei Deng diff --git a/0003-sched-fix-sysfs-removed-too-late.patch b/1003-sched-fix-sysfs-removed-too-late.patch similarity index 96% rename from 0003-sched-fix-sysfs-removed-too-late.patch rename to 1003-sched-fix-sysfs-removed-too-late.patch index 0339c8b..d30210c 100644 --- a/0003-sched-fix-sysfs-removed-too-late.patch +++ b/1003-sched-fix-sysfs-removed-too-late.patch @@ -1,7 +1,7 @@ From 847a2e79bd05045a224250560462480fd026954c Mon Sep 17 00:00:00 2001 From: Cruz Zhao Date: Mon, 5 Dec 2022 16:33:53 +0800 -Subject: [PATCH 3/6] sched: fix sysfs removed too late +Subject: [PATCH 3/7] sched: fix sysfs removed too late Signed-off-by: Cruz Zhao Signed-off-by: Erwei Deng diff --git a/0004-sched-work-around-AliSecGuard.patch b/1004-sched-work-around-AliSecGuard.patch similarity index 97% rename from 0004-sched-work-around-AliSecGuard.patch rename to 1004-sched-work-around-AliSecGuard.patch index c1be866..576b0e2 100644 --- a/0004-sched-work-around-AliSecGuard.patch +++ b/1004-sched-work-around-AliSecGuard.patch @@ -1,7 +1,7 @@ From ca18290cd2bc7b2885533eb78b75c0338f523650 Mon Sep 17 00:00:00 2001 Form: Cruz Zhao Date: Mon, 5 Dec 2022 22:32:01 +0800 -Subject: [PATCH 4/6] sched: work around AliSecGuard +Subject: [PATCH 4/7] sched: work around AliSecGuard AliSecGuard made plugsched unable to work on ECS instances. This patch workarounds this issue by placing jmp instruction diff --git a/0005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch b/1005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch similarity index 96% rename from 0005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch rename to 1005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch index 91ef5bf..db15705 100644 --- a/0005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch +++ b/1005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch @@ -1,7 +1,7 @@ From 82a9b17ad63e0de8d6caa2bb967e5e7b6f7cee14 Mon Sep 17 00:00:00 2001 From: Yihao Wu Date: Tue, 6 Dec 2022 10:32:53 +0800 -Subject: [PATCH 5/6] sched: fix panic when CPU hotplug on 5.10 +Subject: [PATCH 5/7] sched: fix panic when CPU hotplug on 5.10 Since commit ace8031099f9("sched/topology: Make local variables static"), sched_domains_tmpmask becomes local variable. And plugsched tags local diff --git a/0006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch b/1006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch similarity index 99% rename from 0006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch rename to 1006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch index fb0c034..4442677 100644 --- a/0006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch +++ b/1006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch @@ -1,7 +1,7 @@ From 8a26b4dc36cc080e64ae45a1b0e9e5a1af01f0c4 Mon Sep 17 00:00:00 2001 From: Erwei Deng Date: Tue, 6 Dec 2022 15:32:43 +0800 -Subject: [PATCH 6/6] sched: add the sidecar of smp.c to fix the scheduler_ipi +Subject: [PATCH 6/7] sched: add the sidecar of smp.c to fix the scheduler_ipi Signed-off-by: Yihao Wu Signed-off-by: Erwei Deng diff --git a/1007-sched-miss-put_prev_task-after-pick_next_task.patch b/1007-sched-miss-put_prev_task-after-pick_next_task.patch new file mode 100644 index 0000000..0acf789 --- /dev/null +++ b/1007-sched-miss-put_prev_task-after-pick_next_task.patch @@ -0,0 +1,34 @@ +From 80ccfba300328c06324931540264c760aae11b01 Mon Sep 17 00:00:00 2001 +From: Erwei Deng +Date: Wed, 7 Dec 2022 19:05:28 +0800 +Subject: [PATCH 7/7] sched: miss put_prev_task after pick_next_task + +Signed-off-by: Cruz Zhao +Signed-off-by: Erwei Deng +--- + .../kernel/sched/mod/sched_rebuild.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/kernel/sched/mod/sched_rebuild.c b/kernel/sched/mod/sched_rebuild.c +index 25ff5c006..cf69db2eb 100644 +--- a/kernel/sched/mod/sched_rebuild.c ++++ b/kernel/sched/mod/sched_rebuild.c +@@ -102,10 +102,13 @@ void clear_sched_state(bool mod) + p = __orig_fair_sched_class.pick_next_task(rq); + if (!p) + break; +- if (mod) ++ if (mod) { ++ fair_sched_class.put_prev_task(rq, p); + fair_sched_class.dequeue_task(rq, p, queue_flags); +- else ++ } else { ++ __orig_fair_sched_class.put_prev_task(rq, p); + __orig_fair_sched_class.dequeue_task(rq, p, queue_flags); ++ } + list_add_tail_rcu(&p->tasks, &per_cpu(tmp_list, cpu)); + } + raw_spin_unlock(&rq->lock); +-- +2.27.0 + diff --git a/scheduler-group-identity.spec b/scheduler-group-identity.spec index 5c3121c..1f90434 100644 --- a/scheduler-group-identity.spec +++ b/scheduler-group-identity.spec @@ -4,7 +4,7 @@ %define anolis_version 1 %define KVER 5.10.134 %define KREL 12.2 -%define anolis_release 1 +%define anolis_release 2 Name: scheduler-group-identity Version: %{KVER}.%{KREL}.%{anolis_version} @@ -22,12 +22,13 @@ Source2: scheduler-installer Source3: hotfix_conflict_check Source4: version -Patch0001: 0001-sched-enable-the-group-identity.patch -Patch0002: 0002-sched-resuce-dying-tasks-on-rq.patch -Patch0003: 0003-sched-fix-sysfs-removed-too-late.patch -Patch0004: 0004-sched-work-around-AliSecGuard.patch -Patch0005: 0005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch -Patch0006: 0006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch +Patch1001: 1001-sched-enable-the-group-identity.patch +Patch1002: 1002-sched-resuce-dying-tasks-on-rq.patch +Patch1003: 1003-sched-fix-sysfs-removed-too-late.patch +Patch1004: 1004-sched-work-around-AliSecGuard.patch +Patch1005: 1005-sched-fix-panic-when-CPU-hotplug-on-5.10.patch +Patch1006: 1006-sched-add-the-sidecar-of-smp.c-to-fix-the-scheduler_.patch +Patch1007: 1007-sched-miss-put_prev_task-after-pick_next_task.patch ExclusiveArch: x86_64 @@ -112,5 +113,8 @@ systemctl reset-failed plugsched %changelog +* Wed Dec 7 2022 Erwei Deng - 5.10.134.12.2.1-2 +- fix a bug of missing put_prev_task_fair after pick_next_task_fair + * Mon Dec 5 2022 Erwei Deng - 5.10.134.12.2.1-1 - add the group identity feature to scheduler -- Gitee