Re: [PATCH 13/32] nohz: Adaptive tick stop and restart on nohzcpuset

From: Peter Zijlstra
Date: Mon Aug 29 2011 - 11:28:43 EST


On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> +bool cpuset_nohz_can_stop_tick(void)
> +{
> + struct rq *rq;
> +
> + rq = this_rq();
> +
> + /* More than one running task need preemption */
> + if (rq->nr_running > 1)
> + return false;
> +
> + return true;
> +}

int sched_needs_cpu(int cpu), seems the right name, matches the existing
{rcu,printk,arch}_needs_cpu() functions.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/