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]
Date:	Fri, 08 Apr 2011 19:01:19 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	bharata@...ux.vnet.ibm.com
Cc:	Paul Turner <pjt@...gle.com>, linux-kernel@...r.kernel.org,
	Dhaval Giani <dhaval.giani@...il.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
	Srivatsa Vaddagiri <vatsa@...ibm.com>,
	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>, Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [patch 02/15] sched: validate CFS quota hierarchies

On Thu, 2011-03-24 at 12:01 +0530, Bharata B Rao wrote:
> On Tue, Mar 22, 2011 at 08:03:28PM -0700, Paul Turner wrote:
> > Add constraints validation for CFS bandwidth hierachies.
> > 
> > +static u64 normalize_cfs_quota(struct task_group *tg,
> > +		               struct cfs_schedulable_data *d)
> > +{
> > +	u64 quota, period;
> > +	struct load_weight lw;
> > +
> > +	if (tg == d->tg) {
> > +		period = d->period;
> > +		quota = d->quota;
> > +	} else {
> > +		period = tg_get_cfs_period(tg);
> > +		quota = tg_get_cfs_quota(tg);
> > +	}
> > +
> > +	if (quota == RUNTIME_INF)
> > +		return RUNTIME_INF;
> > +
> > +	lw.weight = period;
> > +	lw.inv_weight = 0;
> > +
> > +	return calc_delta_mine(quota, max_cfs_quota_period, &lw) - 1;
> 
> Time to rename calc_delta_mine to something more meaningful ?

Or not use it there at all:

 - I'm not sure why we have different periods per cgroup, given that we
don't have EDF like scheduling and there's a very limited set of useful
periods. Too small and overhead increases like mad, too large and we get
lots of priority inversion crap.

 - Its not a fast-path by any means, so a straight fwd division wouldn't
hurt anybody.


--
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