lkml.org 
[lkml]   [2018]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 2/2] rcu: Make expedited GPs handle CPU 0 being offline
On Mon, Jun 25, 2018 at 03:43:32PM -0700, Paul E. McKenney wrote:
> + preempt_disable();
> + for_each_leaf_node_possible_cpu(rnp, cpu) {
> + if (cpu_is_offline(cpu)) /* Preemption disabled. */
> + continue;

Create for_each_node_online_cpu() instead? Seems a bit pointless to
iterate possible mask only to then check it against the online mask.
Just iterate the online mask directly.

Or better yet, write this as:

preempt_disable();
cpu = cpumask_next(rnp->grplo - 1, cpu_online_mask);
if (cpu > rnp->grphi)
cpu = WORK_CPU_UNBOUND;
queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work);
preempt_enable();

Which is what it appears to be doing.

> + queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work);
> + rnp->exp_need_flush = true;
> + break;
> + }
> + preempt_enable();
> + if (!rnp->exp_need_flush) { /* All offline, report QSes. */
> + queue_work(rcu_par_gp_wq, &rnp->rew.rew_work);
> + rnp->exp_need_flush = true;
> + }
> }
>
> /* Wait for workqueue jobs (if any) to complete. */
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2018-06-26 11:38    [W:0.064 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site