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: <CAPM31R+FDXUNb_X9R6O+kqjsAJftEzmyk+Ji=KoAyzEsTDWLew@mail.gmail.com>
Date:	Tue, 13 Aug 2013 01:08:17 -0700
From:	Paul Turner <pjt@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Lei Wen <adrian.wenl@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>, Lei Wen <leiwen@...vell.com>
Subject: Re: false nr_running check in load balance?

On Tue, Aug 13, 2013 at 12:38 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, Aug 13, 2013 at 12:45:12PM +0800, Lei Wen wrote:
>> > Not quite right; I think you need busiest->cfs.h_nr_running.
>> > cfs.nr_running is the number of entries running in this 'group'. If
>> > you've got nested groups like:
>> >
>> >  'root'
>> >    \
>> >    'A'
>> >    / \
>> >   t1 t2
>> >
>> > root.nr_running := 1 'A', even though you've got multiple running tasks.
>> >
>>
>> You're absolutely right for this. :)
>> I miss it for not considering the group case...
>>
>> Then do you think it is necessary to do below change in load_balance() code?
>>  -       if (busiest->nr_running > 1) {
>>  +       if (busiest->cfs.h_nr_running > 1) {
>>
>
> Yes I think that would be fine.

If we pivot to use h_nr_running we should probably also update
call-sites such as cpu_load_avg_per_task() for consistency.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ