lkml.org 
[lkml]   [2011]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/12] cgroups: New resource counter inheritance API
On Tue,  6 Sep 2011 02:12:56 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:

> +void res_counter_inherit(struct res_counter *counter, int member)
> +{
> + struct res_counter *parent;
> + unsigned long long val;
> +
> + parent = counter->parent;
> + if (parent) {
> + val = res_counter_read_u64(parent, member);
> + res_counter_write_u64(counter, member, val);
> + }
> +}

What locking protects the read-modify-write? If none, please fix,
otherwise please document it.

All of kernel/res_counter.c is charmingly undocumented.


\
 
 \ /
  Last update: 2011-09-07 00:21    [W:0.128 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site