Skip to content

Commit 54baa7a

Browse files
committed
Revert "sched_ext: Use shorter slice while bypassing"
This reverts commit 6f34d8d. Slice length is ignored while bypassing and tasks are switched on every tick and thus the patch does not make any difference. The perceived difference was from test noise. Signed-off-by: Tejun Heo <[email protected]> Acked-by: David Vernet <[email protected]>
1 parent c425180 commit 54baa7a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kernel/sched/ext.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#define SCX_OP_IDX(op) (offsetof(struct sched_ext_ops, op) / sizeof(void (*)(void)))
1010

1111
enum scx_consts {
12-
SCX_SLICE_BYPASS = SCX_SLICE_DFL / 4,
1312
SCX_DSP_DFL_MAX_BATCH = 32,
1413
SCX_DSP_MAX_LOOPS = 32,
1514
SCX_WATCHDOG_MAX_TIMEOUT = 30 * HZ,
@@ -1949,7 +1948,6 @@ static bool scx_rq_online(struct rq *rq)
19491948
static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
19501949
int sticky_cpu)
19511950
{
1952-
bool bypassing = scx_rq_bypassing(rq);
19531951
struct task_struct **ddsp_taskp;
19541952
unsigned long qseq;
19551953

@@ -1967,7 +1965,7 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
19671965
if (!scx_rq_online(rq))
19681966
goto local;
19691967

1970-
if (bypassing)
1968+
if (scx_rq_bypassing(rq))
19711969
goto global;
19721970

19731971
if (p->scx.ddsp_dsq_id != SCX_DSQ_INVALID)
@@ -2022,7 +2020,7 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
20222020

20232021
global:
20242022
touch_core_sched(rq, p); /* see the comment in local: */
2025-
p->scx.slice = bypassing ? SCX_SLICE_BYPASS : SCX_SLICE_DFL;
2023+
p->scx.slice = SCX_SLICE_DFL;
20262024
dispatch_enqueue(find_global_dsq(p), p, enq_flags);
20272025
}
20282026

0 commit comments

Comments
 (0)