Thread (54 messages) 54 messages, 5 authors, 2018-07-30

Re: [RFC PATCH v4 08/12] sched: Add over-utilization/tipping point indicator

From: Peter Zijlstra <peterz@infradead.org>
Date: 2018-07-06 11:32:25
Also in: lkml

On Thu, Jun 28, 2018 at 12:40:39PM +0100, Quentin Perret wrote:
quoted hunk ↗ jump to hunk
@@ -5384,6 +5402,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
 {
 	struct cfs_rq *cfs_rq;
 	struct sched_entity *se = &p->se;
+	int task_new = !(flags & ENQUEUE_WAKEUP);
 
 	/*
 	 * The code below (indirectly) updates schedutil which looks at
@@ -5431,8 +5450,12 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
 		update_cfs_group(se);
 	}
 
-	if (!se)
+	if (!se) {
 		add_nr_running(rq, 1);
+		if (!task_new)
+			update_overutilized_status(rq);
I'm confused... why only for !ENQUEUE_WAKEUP and why use a local
variable for something that's used only once?
+	}
 
 	hrtick_update(rq);
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help