[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151208155703.GA4192@lerouge>
Date: Tue, 8 Dec 2015 16:57:05 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Chris Metcalf <cmetcalf@...hip.com>,
Thomas Gleixner <tglx@...utronix.de>,
Luiz Capitulino <lcapitulino@...hat.com>,
Christoph Lameter <cl@...ux.com>,
Ingo Molnar <mingo@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 2/7] nohz: New tick dependency mask
On Wed, Dec 02, 2015 at 04:09:08PM +0100, Peter Zijlstra wrote:
> On Wed, Dec 02, 2015 at 03:08:16PM +0100, Frederic Weisbecker wrote:
> > On Wed, Dec 02, 2015 at 11:56:33AM +0100, Peter Zijlstra wrote:
> > > On Tue, Dec 01, 2015 at 11:20:28PM +0100, Frederic Weisbecker wrote:
> > > > > > + prev = fetch_or(dep, BIT_MASK(bit));
> > > > > > + if (!prev) {
> > > > > > + /*
> > > > > > + * We need the IPIs to be sent from sane process context.
> > > > >
> > > > > Why ?
> > > >
> > > > Because posix timers code is all called with interrupts disabled and we can't
> > > > send IPIs then.
> > > >
> > > > >
> > > > > > + * The posix cpu timers are always set with irqs disabled.
> > > > > > + */
> > > > > > + schedule_work(&kick_all_work);
> > > > > > + }
> > > > > > +}
> > > > > > +
> > > > > > +/*
> > > > > > + * Set a global tick dependency. Lets do the wide IPI kick asynchronously
> > > > > > + * for callers with irqs disabled.
> > > > >
> > > > > This seems to suggest you can call this with IRQs disabled
> > > >
> > > > Ah right, that's a misleading comment. We need to use the _delayed() version
> > > > when interrupts are disabled.
> > >
> > > Why can't you use tick_nohz_full_kick_cpu() for all that, which is
> > > usable from IRQ context and avoid all that delayed muck?
> >
> > Because I need to kick all the CPUs where the task/signal is running on. That's
> > a bit difficult to do though. I think we had something to try to send an IPI to a task,
> > but I can't retrieve it. Looks easy to do anyway. But in the signal case I'd need to do
> > that for all tasks in the group. That sounds like a costly loop.
> >
> > So I simplify that with a global IPI.
>
> Sure, but what I meant was that:
>
> for_each_cpu(cpu, mask)
> tick_nohz_full_kick_cpu(cpu);
>
> is IRQ safe, whereas the current thingy is not. Sure, its a wee bit less
> efficient, but do we really care?
Right, this overhead probably doesn't matter much. I'll do that and we'll see if
people complain.
--
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