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: <CAPM31RKj0SJB6eCDSpH29OdfeNGDXqzoQQWhQP7t3gdxYx+wrQ@mail.gmail.com>
Date:	Tue, 2 Apr 2013 19:22:24 -0700
From:	Paul Turner <pjt@...gle.com>
To:	Alex Shi <alex.shi@...el.com>
Cc:	Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Borislav Petkov <bp@...en8.de>, Mike Galbraith <efault@....de>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	gregkh@...uxfoundation.org,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch v6 10/21] sched: get rq potential maximum utilization

On Tue, Apr 2, 2013 at 7:15 PM, Alex Shi <alex.shi@...el.com> wrote:
> On 04/02/2013 05:02 PM, Namhyung Kim wrote:
>>> > +  cfs_util = (FULL_UTIL - rt_util) > rq->util ? rq->util
>>> > +                  : (FULL_UTIL - rt_util);
>>> > +  nr_running = rq->nr_running ? rq->nr_running : 1;
>> This can be cleaned up with proper min/max().
>>
>>> > +
>>> > +  return rt_util + cfs_util * nr_running;
>> Should this nr_running consider tasks in cfs_rq only?
>
> use nr_running of cfs_rq seems better, but when use sched autogroup,
> only cfs->nr_running just the active group number, not the total active
> task number. :(

Why not just use cfs_rq->h_nr_running?  This is always the total
*tasks* in he hierarchy parented that cfs_rq.  (This also has the nice property
of not including group_entities.)

>
>   Also it seems
>> there's no upper bound so that it can possibly exceed FULL_UTIL.
>
>
> --
> Thanks Alex
--
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