Skip to content

Commit

Permalink
sched/alt: Remove psi support
Browse files Browse the repository at this point in the history
There are issues(#70, torvalds#72, torvalds#79) with psi support. Removing the
support of psi as it doesn't bring much gain.
  • Loading branch information
cchalpha committed Nov 18, 2024
1 parent 85484a6 commit 813e77f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ config TASK_IO_ACCOUNTING

config PSI
bool "Pressure stall information tracking"
depends on !SCHED_ALT
select KERNFS
help
Collect metrics that indicate how overcommitted the CPU, memory,
Expand Down
8 changes: 0 additions & 8 deletions kernel/sched/alt_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)

rq->prev_irq_time += irq_delta;
delta -= irq_delta;
psi_account_irqtime(rq->curr, irq_delta);
#endif
#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
if (static_key_false((&paravirt_steal_rq_enabled))) {
Expand Down Expand Up @@ -769,7 +768,6 @@ unsigned long get_wchan(struct task_struct *p)
*/
#define __SCHED_DEQUEUE_TASK(p, rq, flags, func) \
sched_info_dequeue(rq, p); \
psi_dequeue(p, flags & DEQUEUE_SLEEP); \
\
list_del(&p->sq_node); \
if (list_empty(&rq->queue.heads[p->sq_idx])) { \
Expand All @@ -779,7 +777,6 @@ unsigned long get_wchan(struct task_struct *p)

#define __SCHED_ENQUEUE_TASK(p, rq, flags) \
sched_info_enqueue(rq, p); \
psi_enqueue(p, flags & ENQUEUE_WAKEUP); \
\
p->sq_idx = task_sched_prio_idx(p, rq); \
list_add_tail(&p->sq_node, &rq->queue.heads[p->sq_idx]); \
Expand Down Expand Up @@ -2954,7 +2951,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
}

wake_flags |= WF_MIGRATED;
psi_ttwu_dequeue(p);
set_task_cpu(p, cpu);
}
#else
Expand Down Expand Up @@ -4828,8 +4824,6 @@ static void __sched notrace __schedule(unsigned int sched_mode)
*/
++*switch_count;

psi_sched_switch(prev, next, !task_on_rq_queued(prev));

trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state);

/* Also unlocks the rq: */
Expand Down Expand Up @@ -7689,8 +7683,6 @@ void __init sched_init(void)
sched_init_topology_cpumask_early();
#endif /* SMP */

psi_init();

preempt_dynamic_init();
}

Expand Down
1 change: 0 additions & 1 deletion kernel/sched/alt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <linux/context_tracking.h>
#include <linux/profile.h>
#include <linux/psi.h>
#include <linux/stop_machine.h>
#include <linux/syscalls.h>
#include <linux/tick.h>
Expand Down

0 comments on commit 813e77f

Please sign in to comment.