[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110817021824.GC32132@somewhere.redhat.com>
Date: Wed, 17 Aug 2011 04:18:26 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Anton Blanchard <anton@....ibm.com>,
Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
Lai Jiangshan <laijs@...fujitsu.com>,
Paul Menage <menage@...gle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Stephen Hemminger <shemminger@...tta.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tim Pepper <lnxninja@...ux.vnet.ibm.com>
Subject: Re: [PATCH 22/32] rcu: Restart tick if we enqueue a callback in a
nohz/cpuset CPU
On Tue, Aug 16, 2011 at 01:20:05PM -0700, Paul E. McKenney wrote:
> > @@ -1546,6 +1547,13 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
> > rdp->nxttail[RCU_NEXT_TAIL] = &head->next;
> > rdp->qlen++;
> >
> > + /* Restart the timer if needed to handle the callbacks */
> > + if (tick_nohz_adaptive_mode()) {
> > + /* Make updates on nxtlist visible to self IPI */
> > + barrier();
> > + smp_cpuset_update_nohz(smp_processor_id());
> > + }
> > +
>
> But this must be happening in a system call or interrupt handler, right?
> If so, won't we get a chance to check things on exit from the system call
> or interrupt? Or are you hooking only into syscall entry?
Sure in theory when we call call_rcu() we are in the kernel and thus not
very far from a syscall/exception/irq exit into userspace or a scheduling
out.
We could rely on that assumption and I bet it won't ever be a problem
in practice. I just wanted to ensure we don't spend too much time
before handling that callback.
> > /* If interrupts were disabled, don't dive into RCU core. */
> > if (irqs_disabled_flags(flags)) {
> > local_irq_restore(flags);
> > --
> > 1.7.5.4
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists