[Devel] [PATCH RHEL7 COMMIT] Revert "sched: add WARN_ON's to debug task boosting"

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jan 17 12:34:47 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1062.7.1.vz7.130.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.7.1.vz7.130.10
------>
commit 3ad70f5be8a36e15346d60232a8b1ec7f1ee7b53
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Fri Jan 17 12:34:44 2020 +0300

    Revert "sched: add WARN_ON's to debug task boosting"
    
    This reverts commit 3d851e6c647e378917248bb2f1733841eba47f09.
    
    Task boosting hacks are going to be removed, hence no need
    to debug it.
    
    https://jira.sw.ru/browse/PSBM-100188
    
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 kernel/sched/fair.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 49ff7cd30cee8..0e7ab2050af04 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -997,10 +997,9 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
 #ifdef CONFIG_CFS_BANDWIDTH
 static inline void update_entity_boost(struct sched_entity *se)
 {
-	if (!entity_is_task(se)) {
+	if (!entity_is_task(se))
 		se->boosted = cfs_rq_has_boosted_entities(group_cfs_rq(se));
-		WARN_ON(se->boosted && cfs_rq_throttled(group_cfs_rq(se)));
-	} else {
+	else {
 		struct task_struct *p = task_of(se);
 
 		if (unlikely(p != current))
@@ -1032,8 +1031,6 @@ static inline void __enqueue_boosted_entity(struct cfs_rq *cfs_rq,
 static inline void __dequeue_boosted_entity(struct cfs_rq *cfs_rq,
 					    struct sched_entity *se)
 {
-	if (WARN_ON(se->boost_node.next == LIST_POISON1))
-		return;
 	list_del(&se->boost_node);
 }
 
@@ -1044,11 +1041,8 @@ static int enqueue_boosted_entity(struct cfs_rq *cfs_rq,
 		if (se != cfs_rq->curr)
 			__enqueue_boosted_entity(cfs_rq, se);
 		se->boosted = 1;
-		WARN_ON(!entity_is_task(se) &&
-			cfs_rq_throttled(group_cfs_rq(se)));
 		return 1;
-	} else
-		WARN_ON(cfs_rq_throttled(group_cfs_rq(se)));
+	}
 
 	return 0;
 }
@@ -4091,8 +4085,6 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)
  */
 static void check_enqueue_throttle(struct cfs_rq *cfs_rq, int flags)
 {
-	WARN_ON(cfs_rq_has_boosted_entities(cfs_rq));
-
 	if (!cfs_bandwidth_used())
 		return;
 
@@ -4456,10 +4448,8 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
 	} else if (boost) {
 		for_each_sched_entity(se) {
 			cfs_rq = cfs_rq_of(se);
-			if (!enqueue_boosted_entity(cfs_rq, se)) {
-				WARN_ON(throttled_hierarchy(cfs_rq));
+			if (!enqueue_boosted_entity(cfs_rq, se))
 				break;
-			}
 			if (cfs_rq_throttled(cfs_rq))
 				unthrottle_cfs_rq(cfs_rq);
 		}
@@ -4520,10 +4510,8 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
 		cfs_rq = cfs_rq_of(se);
 		cfs_rq->h_nr_running--;
 
-		if (cfs_rq_throttled(cfs_rq)) {
-			WARN_ON(boosted);
+		if (cfs_rq_throttled(cfs_rq))
 			break;
-		}
 
 		if (boosted)
 			boosted = dequeue_boosted_entity(cfs_rq, se);



More information about the Devel mailing list