All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Christoph Lameter <cl@linux.com>, Ingo Molnar <mingo@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2/7] nohz: New tick dependency mask
Date: Tue, 8 Dec 2015 16:57:05 +0100	[thread overview]
Message-ID: <20151208155703.GA4192@lerouge> (raw)
In-Reply-To: <20151202150908.GR3816@twins.programming.kicks-ass.net>

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.

  reply	other threads:[~2015-12-08 15:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 14:22 [PATCH 0/7] nohz: Tick dependency mask v3 Frederic Weisbecker
2015-11-13 14:22 ` [PATCH 1/7] atomic: Export fetch_or() Frederic Weisbecker
2015-11-24 15:58   ` Chris Metcalf
2015-11-24 21:19     ` Frederic Weisbecker
2015-11-24 21:48       ` Chris Metcalf
2015-11-30 17:36         ` Frederic Weisbecker
2015-11-30 18:17           ` Chris Metcalf
2015-11-25  9:13       ` Peter Zijlstra
2015-11-13 14:22 ` [PATCH 2/7] nohz: New tick dependency mask Frederic Weisbecker
2015-11-24 16:19   ` Chris Metcalf
2015-11-25 11:32     ` Frederic Weisbecker
2015-12-01 20:41   ` Peter Zijlstra
2015-12-01 22:20     ` Frederic Weisbecker
2015-12-02 10:56       ` Peter Zijlstra
2015-12-02 14:08         ` Frederic Weisbecker
2015-12-02 15:09           ` Peter Zijlstra
2015-12-08 15:57             ` Frederic Weisbecker [this message]
2015-12-02 12:45       ` Peter Zijlstra
2015-12-02 14:10         ` Frederic Weisbecker
2015-12-02 12:48       ` Peter Zijlstra
2015-12-02 14:11         ` Frederic Weisbecker
2015-11-13 14:22 ` [PATCH 3/7] perf: Migrate perf to use new tick dependency mask model Frederic Weisbecker
2015-11-24 16:19   ` Chris Metcalf
2015-11-25 12:34     ` Frederic Weisbecker
2015-12-02 16:17       ` Peter Zijlstra
2015-12-02 17:03         ` Frederic Weisbecker
2015-12-02 17:15           ` Peter Zijlstra
2015-11-13 14:22 ` [PATCH 4/7] sched: Account rr and fifo tasks separately Frederic Weisbecker
2015-12-02 12:53   ` Peter Zijlstra
2015-12-02 14:16     ` Frederic Weisbecker
2015-11-13 14:22 ` [PATCH 5/7] sched: Migrate sched to use new tick dependency mask model Frederic Weisbecker
2015-11-13 14:22 ` [PATCH 6/7] posix-cpu-timers: Migrate " Frederic Weisbecker
2015-11-13 14:22 ` [PATCH 7/7] sched-clock: " Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151208155703.GA4192@lerouge \
    --to=fweisbec@gmail.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@ezchip.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.