[Devel] [PATCH rh7 1/2] Revert "sched: add WARN_ON's to debug task boosting"

Kirill Tkhai ktkhai at virtuozzo.com
Fri Jan 10 13:13:59 MSK 2020


On 10.01.2020 13:05, Andrey Ryabinin wrote:
> 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>

Both of patches are:

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 49ff7cd30cee..0e7ab2050af0 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