lkml.org 
[lkml]   [2010]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 2/7] sched: accumulate per-cfs_rq cpu usage
    * Nikhil Rao <ncrao@google.com> [2010-10-13 07:41:46]:

    > On Wed, Oct 13, 2010 at 6:59 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
    > > * Nikhil Rao <ncrao@google.com> [2010-10-13 06:46:18]:
    > >
    > >> > Quick question for cfs_b->quota == RUNTIME_INF, won't cfs_b->runtime
    > >> > be always > 0?
    > >>
    > >> Hi Balbir,
    > >>
    > >> cfs_b->runtime can be 0 if the task group exhausts its quota.
    > >> cfs_b->runtime is a counter that is periodically refreshed to
    > >> cfs_b->quota, and is decremented every time a cfs_rq requests a slice.
    > >>
    > >
    > > Thanks, Nikhil
    > >
    > > I saw several checks for quota == RUNTIME_INF and saw updates not
    > > happening. Do we track usage for cgroups with infinite quota? IOW, is
    > > runtime updated? If so, why?
    > >
    >
    > We don't track usage or update runtime for cgroups with infinite
    > quota. Most of these RUNTIME_INF checks are usually at the top of the
    > functions and return immediately. The checks in the middle of
    > functions are mostly to prevent races when cfs_b->quota is updated.
    >
    > And ... I think I might have misunderstood your original question. Let
    > me try answering that again. We check for quota == RUNTIME_INF (in
    > addition to cfs_b->runtime > 0) because it is possible that the global
    > pool is updated to RUNTIME_INF between the quota check in
    > account_cfs_rq_quota() and when the actual quota is distributed in
    > tg_request_cfs_quota(). I hope that answers your original question.
    >

    Yes, it does, thanks!

    --
    Three Cheers,
    Balbir


    \
     
     \ /
      Last update: 2010-10-14 07:43    [W:0.029 / U:208.980 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site