Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7b54b8b authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

sched: walt: Update the wakeup timestamp for a non-new task



note_task_waking is defined under CONFIG_SCHED_HMP and thus
we will never update it with !CONFIG_SCHED_HMP selected.
This causes certain features to report max-load to the
governor resulting in unnecessary max-freq jumps. Add the
definition under CONFIG_SCHED_WALT. For now let's just
keep the wakeup-timestamp updation and leave the sleep
timestamp out of it.

Change-Id: I64ca38a9bfa1a61d042710e9ae7df208ca8a3a90
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 4d9a308b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2211,11 +2211,13 @@ static inline u64 irq_time_read(int cpu)

#ifdef CONFIG_SCHED_WALT
u64 sched_ktime_clock(void);
void note_task_waking(struct task_struct *p, u64 wallclock);
#else /* CONFIG_SCHED_WALT */
static inline u64 sched_ktime_clock(void)
{
	return 0;
}
static inline void note_task_waking(struct task_struct *p, u64 wallclock) { }
#endif /* CONFIG_SCHED_WALT */

#ifdef CONFIG_CPU_FREQ
@@ -2939,8 +2941,6 @@ static inline int pct_task_load(struct task_struct *p) { return 0; }
static inline void notify_migration(int src_cpu, int dest_cpu,
			bool src_cpu_dead, struct task_struct *p) { }

static inline void note_task_waking(struct task_struct *p, u64 wallclock) { }

static inline void
check_for_freq_change(struct rq *rq, bool check_pred, bool check_groups) { }

+5 −0
Original line number Diff line number Diff line
@@ -2896,6 +2896,11 @@ void sched_update_cpu_freq_min_max(const cpumask_t *cpus, u32 fmin, u32 fmax)
		update_cpu_cluster_capacity(cpus);
}

void note_task_waking(struct task_struct *p, u64 wallclock)
{
	p->last_wake_ts = wallclock;
}

/*
 * Task's cpu usage is accounted in:
 *	rq->curr/prev_runnable_sum,  when its ->grp is NULL