lkml.org 
[lkml]   [2011]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
> >


\
 
 \ /
  Last update: 2011-08-17 04:21    [W:0.178 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site