Pádraig Brady wrote:
> V2 attached with comments.

Thanks. I can't spot any obvious mistake. But nevertheless:

  - The line
            cpu_quota = MAX (1, (long)((double)quota / period + 0.5));
    can be simplified to
            cpu_quota = MAX (1, (long)(ncpus + 0.5));

  - When cleaning up variables, it's more systematic to free them in reverse
    allocation order, that is:

    free (quota_str);
    free (mount);
    free (cgroup_str);

  - In the
      while (cgroup && *cgroup)
    loop, it would be useful to have a comment regarding what the 
slash-separated
    components of a cgroup are.

  - What is the point of testing HAVE_SCHED_GETAFFINITY_LIKE_GLIBC?
    Linux has had sched_getscheduler() for ages.

Bruno




Reply via email to