lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH tip/core/rcu 01/23] rcu: Move RCU grace-period initialization into a kthread
On Thu, Sep 06, 2012 at 03:32:22PM +0200, Peter Zijlstra wrote:
> On Thu, 2012-08-30 at 11:18 -0700, Paul E. McKenney wrote:
> > +static int rcu_gp_kthread(void *arg)
> > +{
> > + unsigned long flags;
> > + struct rcu_data *rdp;
> > + struct rcu_node *rnp;
> > + struct rcu_state *rsp = arg;
> > +
> > + for (;;) {
> > +
> > + /* Handle grace-period start. */
> > + rnp = rcu_get_root(rsp);
> > + for (;;) {
> > + wait_event_interruptible(rsp->gp_wq, rsp->gp_flags);
> > + if (rsp->gp_flags)
> > + break;
> > + flush_signals(current);
> > + }
> > + raw_spin_lock_irqsave(&rnp->lock, flags);
>
> You're in a kthread, it should be impossible for IRQs to be disabled
> here, no? Similar for most (all) other sites in this function.
>
> Using the unconditional IRQ disable/enable is generally faster.

I suppose I could see my way to using raw_spin_lock_irq() here. ;-)

Thanx, Paul



\
 
 \ /
  Last update: 2012-09-06 20:22    [W:0.332 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site