lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Oct 2023 22:02:13 -0500
From:   Youssef Esmat <youssefesmat@...omium.org>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     peterz@...radead.org, bsegall@...gle.com, mingo@...nel.org,
        vincent.guittot@...aro.org, juri.lelli@...hat.com,
        dietmar.eggemann@....com, rostedt@...dmis.org, mgorman@...e.de,
        bristot@...hat.com, corbet@....net, qyousef@...alina.io,
        chris.hyser@...cle.com, patrick.bellasi@...bug.net, pjt@...gle.com,
        pavel@....cz, qperret@...gle.com, tim.c.chen@...ux.intel.com,
        joshdon@...gle.com, timj@....org, kprateek.nayak@....com,
        yu.c.chen@...el.com, joel@...lfernandes.org, efault@....de,
        tglx@...utronix.de, wuyun.abel@...edance.com,
        Youssef Esmat <youssefesmat@...omium.org>
Subject: [PATCH] sched/eevdf: Toggle eligibility through sched_feat

Interactive workloads see performance gains by disabling eligibility
checks (EEVDF->EVDF). Disabling the checks reduces the number of
context switches and delays less important work (higher deadlines/nice
values) in favor of more important work (lower deadlines/nice values).

That said, that can add large latencies for some work loads and as the
default is eligibility on, but allowing it to be turned off when
beneficial.

Signed-off-by: Youssef Esmat <youssefesmat@...omium.org>
Link: https://lore.kernel.org/lkml/CA+q576MS0-MV1Oy-eecvmYpvNT3tqxD8syzrpxQ-Zk310hvRbw@mail.gmail.com/
---
 kernel/sched/fair.c     | 3 +++
 kernel/sched/features.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a751e552f253..16106da5a354 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -728,6 +728,9 @@ int entity_eligible(struct cfs_rq *cfs_rq, struct sched_entity *se)
 	s64 avg = cfs_rq->avg_vruntime;
 	long load = cfs_rq->avg_load;
 
+	if (!sched_feat(ENFORCE_ELIGIBILITY))
+		return 1;
+
 	if (curr && curr->on_rq) {
 		unsigned long weight = scale_load_down(curr->load.weight);
 
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index f770168230ae..84e38a0045b7 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -7,6 +7,7 @@
 SCHED_FEAT(PLACE_LAG, true)
 SCHED_FEAT(PLACE_DEADLINE_INITIAL, true)
 SCHED_FEAT(RUN_TO_PARITY, true)
+SCHED_FEAT(ENFORCE_ELIGIBILITY, true)
 
 /*
  * Prefer to schedule the task we woke last (assuming it failed
-- 
2.42.0.655.g421f12c284-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ