lkml.org 
[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq to kthread
On Tue, Feb 22, 2011 at 05:39:40PM -0800, Paul E. McKenney wrote:
> +/*
> + * Set the per-rcu_node kthread's affinity to cover all CPUs that are
> + * served by the rcu_node in question.
> + */
> +static void rcu_node_kthread_setaffinity(struct rcu_node *rnp)
> +{
> + cpumask_var_t cm;
> + int cpu;
> + unsigned long mask = rnp->qsmaskinit;
> +
> + if (rnp->node_kthread_task == NULL ||
> + rnp->qsmaskinit == 0)
> + return;
> + if (!alloc_cpumask_var(&cm, GFP_KERNEL))
> + return;
> + cpumask_clear(cm);
> + for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask <<= 1)

There seem to be the same shift problem here.

> + if (mask & 01)
> + cpumask_set_cpu(cpu, cm);
> + set_cpus_allowed_ptr(rnp->node_kthread_task, cm);
> + free_cpumask_var(cm);
> +}


\
 
 \ /
  Last update: 2011-02-23 04:11    [W:0.257 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site