View | Details | Raw Unified | Return to bug 197922 | Differences between
and this patch

Collapse All | Expand All

(-)sys/kern/sched_ule.c (-3 / +4 lines)
Lines 861-874 Link Here
861
{
861
{
862
	struct tdq *tdq;
862
	struct tdq *tdq;
863
863
864
	if (smp_started == 0 || rebalance == 0)
865
		return;
866
864
	/*
867
	/*
865
	 * Select a random time between .5 * balance_interval and
868
	 * Select a random time between .5 * balance_interval and
866
	 * 1.5 * balance_interval.
869
	 * 1.5 * balance_interval.
867
	 */
870
	 */
868
	balance_ticks = max(balance_interval / 2, 1);
871
	balance_ticks = max(balance_interval / 2, 1);
869
	balance_ticks += random() % balance_interval;
872
	balance_ticks += get_cyclecount() % balance_interval;
870
	if (smp_started == 0 || rebalance == 0)
871
		return;
872
	tdq = TDQ_SELF();
873
	tdq = TDQ_SELF();
873
	TDQ_UNLOCK(tdq);
874
	TDQ_UNLOCK(tdq);
874
	sched_balance_group(cpu_top);
875
	sched_balance_group(cpu_top);

Return to bug 197922