Re: [PATCH v3 tip/core/rcu 1/9] rcu: Add call_rcu_tasks()

Peter Zijlstra
2014-08-07T08:49:34Z

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

On Tue, Aug 05, 2014 at 02:55:10PM -0700, Paul E. McKenney wrote:
> +/* Check for nohz_full CPUs executing in userspace. */
> +static void check_no_hz_full_tasks(void)
> +{
> +#ifdef CONFIG_NO_HZ_FULL
> + int cpu;
> + struct task_struct *t;
> +
> + for_each_online_cpu(cpu) {
> + cond_resched();
> + rcu_read_lock();
> + t = rcu_dynticks_task_cur(cpu);
> + if (t == NULL || is_idle_task(t)) {
> + rcu_read_unlock();
> + continue;
> + }
> + if (ACCESS_ONCE(t->rcu_tasks_holdout))
> + ACCESS_ONCE(t->rcu_tasks_holdout) = 0;
> + rcu_read_unlock();
> + }
> +#endif /* #ifdef CONFIG_NO_HZ_FULL */
> +}

That's not hotplug safe afaict, and I've no idea if someone pointed that
out already because people refuse to trim email and I can't be arsed to
wade through pages and pages of quoting.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]