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

Commit 6fb8ab2b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: window-stats: Fix incorrect calculation of partial_demand"

parents f1605330 f2a21ce1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1145,9 +1145,14 @@ update_history(struct rq *rq, struct task_struct *p, u32 runtime, int samples,
		return;

	if (!new_window) {
		for (ridx = 0; ridx < RAVG_HIST_SIZE - 1; ++ridx)
		for (ridx = 0; ridx < RAVG_HIST_SIZE - 1; ++ridx) {
			sum += hist[ridx];
			if (hist[ridx] > max)
				max = hist[ridx];
		}
		sum += runtime;
		if (runtime > max)
			max = runtime;
		goto compute_demand;
	}