All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>,
	Chris Metcalf <cmetcalf@mellanox.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Christoph Lameter <cl@linux.com>, Ingo Molnar <mingo@kernel.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nohz_full: Make sched_should_stop_tick() more conservative
Date: Mon, 18 Apr 2016 10:00:42 +0800	[thread overview]
Message-ID: <CANRm+Cx1wTdGugA1QoyuMtzzHmUY6iF=Ei3BuGoBiPoW-xsC7A@mail.gmail.com> (raw)
In-Reply-To: <D73EF873-2EFD-4F55-9CF1-D7E6ED8D1EC9@infradead.org>

Hi Peterz,
2016-04-05 3:23 GMT+08:00 Peter Zijlstra <peterz@infradead.org>:
>
>
> On 4 April 2016 21:12:23 CEST, Rik van Riel <riel@redhat.com> wrote:
>
>>What is the difference between cfs_rq->h_nr_running,
>>and rq->cfs.nr_running?
>>
>>Why do we have two?
>
>
> H is for hierarchy. That counts the total of runnable tasks in the entire child hierarchy. Nr_running is the number of se  entities in the current tree.

So I think we should at least change cfs_rq->nr_running to
cfs->h_nr_running, I can send a formal patch if you think it makes
sense. :-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1159423..79197df 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -616,7 +616,7 @@ bool sched_can_stop_tick(struct rq *rq)
        }

        /* Normal multitasking need periodic preemption checks */
-       if (rq->cfs.nr_running > 1)
+       if (rq->cfs.h_nr_running > 1)
                return false;

        return true;

Regards,
Wanpeng Li

  reply	other threads:[~2016-04-18  2:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 19:42 [PATCH] nohz_full: Make sched_should_stop_tick() more conservative Chris Metcalf
2016-04-04 19:12 ` Rik van Riel
2016-04-04 19:23   ` Peter Zijlstra
2016-04-18  2:00     ` Wanpeng Li [this message]
2016-04-21 14:42       ` Peter Zijlstra
2016-04-21 16:03         ` Peter Zijlstra
2016-04-25 21:30           ` Chris Metcalf
2016-04-28 10:24           ` [tip:sched/urgent] nohz/full, sched/rt: Fix missed tick-reenabling bug in sched_can_stop_tick() tip-bot for Peter Zijlstra
2016-04-28 13:30             ` Frederic Weisbecker
2016-04-04 19:31   ` [PATCH] nohz_full: Make sched_should_stop_tick() more conservative Chris Metcalf
2016-04-04 19:36     ` Rik van Riel
2016-04-05  0:27       ` Chris Metcalf

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='CANRm+Cx1wTdGugA1QoyuMtzzHmUY6iF=Ei3BuGoBiPoW-xsC7A@mail.gmail.com' \
    --to=kernellwp@gmail.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@mellanox.com \
    --cc=fweisbec@gmail.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.