Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633728

Re: [2/2] sched/fair: Fix O(# total cgroups) in load balance path

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [2/2] sched/fair: Fix O(# total cgroups) in load balance path
Date 2017-05-01 18:20 +0200
Message-ID <tCmdk-2Ui-13@gated-at.bofh.it> (permalink)
References <tAjjz-3pN-11@gated-at.bofh.it> <tAjjz-3pN-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 25, 2017 at 05:43:50PM -0700, Tejun Heo wrote:
> @@ -7007,6 +7008,14 @@ static void update_blocked_averages(int
>  		se = cfs_rq->tg->se[cpu];
>  		if (se && !skip_blocked_update(se))
>  			update_load_avg(se, 0);
> +
> +		/*
> +		 * There can be a lot of idle CPU cgroups.  Don't let fully
> +		 * decayed cfs_rqs linger on the list.
> +		 */
> +		if (!cfs_rq->load.weight && !cfs_rq->avg.load_sum &&
> +		    !cfs_rq->avg.util_sum && !cfs_rq->runnable_load_sum)
> +			list_del_leaf_cfs_rq(cfs_rq);
>  	}
>  	rq_unlock_irqrestore(rq, &rf);
>  }

Right this is a 'known' issue and we recently talked about this.

I think you got the condition right, we want to wait for all the stuff
to be decayed out before taking it off the list.

The only 'problem', which Vincent mentioned in that other thread, is that
NOHZ idle doesn't guarantee decay -- then again, you don't want to go
wake a CPU just to decay this crud either. And if we're idle, the list
being long doesn't matter either.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[2/2] sched/fair: Fix O(# total cgroups) in load balance path Tejun Heo <tj@kernel.org> - 2017-04-26 02:50 +0200
  Re: [2/2] sched/fair: Fix O(# total cgroups) in load balance path Peter Zijlstra <peterz@infradead.org> - 2017-05-01 18:20 +0200
    Re: [2/2] sched/fair: Fix O(# total cgroups) in load balance path Tejun Heo <tj@kernel.org> - 2017-05-01 21:20 +0200

csiph-web