lkml.org 
[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm][PATCH 4/4] Add memrlimit controller accounting and control (v5)
Andrew Morton wrote:
> On Wed, 21 May 2008 21:00:12 +0530 Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
>> This patch adds support for accounting and control of virtual address space
>> limits. The accounting is done via the rlimit_cgroup_(un)charge_as functions.
>> The core of the accounting takes place during fork time in copy_process(),
>> may_expand_vm(), remove_vma_list() and exit_mmap().
>>
>> Changelog v5->v4
>>
>> Move specific hooks in code to insert_vm_struct
>> Use mmap_sem to protect mm->owner from changing and mm->owner from
>> changing cgroups.
>>
>> ...
>>
>> + * brk(), sbrk()), stack expansion, mremap(), etc - called with
>> + * mmap_sem held.
>> + * decreasing - called with mmap_sem held.
>> + * This callback is called with mmap_sem held
>
> It's good to document the locking prerequisites but for rwsems, one
> should specify whether it must be held for reading or for writing.
>
> Of course, down_write() is a superset of down_read(), so if it's "held
> for reading" then either mode-of-holding is OK. But it's best to spell
> all that out.
>

Sure, will do


--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL


\
 
 \ /
  Last update: 2008-05-22 12:19    [W:0.056 / U:5.212 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site