lkml.org 
[lkml]   [2011]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 02/15] sched: validate CFS quota hierarchies
From
Date
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.




\
 
 \ /
  Last update: 2011-04-08 19:03    [W:0.089 / U:1.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site