lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+Cx1wTdGugA1QoyuMtzzHmUY6iF=Ei3BuGoBiPoW-xsC7A@mail.gmail.com>
Date:	Mon, 18 Apr 2016 10:00:42 +0800
From:	Wanpeng Li <kernellwp@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Rik van Riel <riel@...hat.com>,
	Chris Metcalf <cmetcalf@...lanox.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Christoph Lameter <cl@...ux.com>,
	Ingo Molnar <mingo@...nel.org>,
	Luiz Capitulino <lcapitulino@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nohz_full: Make sched_should_stop_tick() more conservative

Hi Peterz,
2016-04-05 3:23 GMT+08:00 Peter Zijlstra <peterz@...radead.org>:
>
>
> On 4 April 2016 21:12:23 CEST, Rik van Riel <riel@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ