All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "Jiang, Yunhong" <yunhong.jiang@intel.com>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Vatika Harlalka <vatikaharlalka@gmail.com>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers
Date: Fri, 4 Sep 2015 11:56:33 -0400	[thread overview]
Message-ID: <20150904115633.2761790e@redhat.com> (raw)
In-Reply-To: <20150901204723.GA6590@lerouge>

On Tue, 1 Sep 2015 22:47:24 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Tue, Sep 01, 2015 at 07:14:13PM +0000, Jiang, Yunhong wrote:
> > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > > index 8b864ec..0902e4d 100644
> > > --- a/kernel/sched/core.c
> > > +++ b/kernel/sched/core.c
> > > @@ -623,18 +623,21 @@ int get_nohz_timer_target(void)
> > >  	int i, cpu = smp_processor_id();
> > >  	struct sched_domain *sd;
> > > 
> > > -	if (!idle_cpu(cpu))
> > > +	if (!idle_cpu(cpu) && is_housekeeping_cpu(cpu))
> > >  		return cpu;
> > > 
> > >  	rcu_read_lock();
> > >  	for_each_domain(cpu, sd) {
> > >  		for_each_cpu(i, sched_domain_span(sd)) {
> > > -			if (!idle_cpu(i)) {
> > > +			if (!idle_cpu(i) && is_housekeeping_cpu(cpu)) {
> > 
> > Hi, Frederic, sorry for a naive question. Per my understanding, the tick_nohz_full_mask is added to cpu_isolated_map in
> > sched_init_smp(), and the cpu_isolated_map is excluded from sched_domain in init_sched_domains(), so why check here?
> 
> Very good observation! But it's better to keep this check in the domain loop in
> case things change in the future such as removing that cpu_isolated_map inclusion
> or other suprises.

I have another observation.

As nohz_full cores are already excluded from the sched domains, this patch
boils down to migrating timers which are queued by the nohz_full core
itself. However, it only fully works for lowres timers. hrtimers may
still fire on nohz_full cores, because hrtimers are only migrated if
the core returned by get_nohz_timer_target() has a queued timer expiring
before than the timer being migrated.

  parent reply	other threads:[~2015-09-04 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 14:50 [GIT PULL] sched/nohz: Affine unpinned timers to housekeepers Frederic Weisbecker
2015-09-01 14:50 ` [PATCH 1/2] nohz: " Frederic Weisbecker
2015-09-01 19:14   ` Jiang, Yunhong
2015-09-01 20:47     ` Frederic Weisbecker
2015-09-02  9:38       ` Mike Galbraith
2015-09-02 12:33         ` Mike Galbraith
2015-09-02 16:16         ` Chris Metcalf
2015-09-02 19:03           ` Jiang, Yunhong
2015-09-03  1:29           ` Mike Galbraith
2015-09-04 15:56       ` Luiz Capitulino [this message]
2015-09-04 17:19         ` Frederic Weisbecker
2015-09-02 15:57   ` [tip:sched/urgent] " tip-bot for Vatika Harlalka
2015-09-01 14:51 ` [PATCH 2/2] nohz: Assert existing housekeepers when nohz full enabled Frederic Weisbecker
2015-09-02 15:57   ` [tip:sched/urgent] " tip-bot for 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=20150904115633.2761790e@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@ezchip.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vatikaharlalka@gmail.com \
    --cc=yunhong.jiang@intel.com \
    /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.