lkml.org 
[lkml]   [2011]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 5/5] exec: document acct_arg_size()
    Add the comment to explain acct_arg_size().

    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    ---

    fs/exec.c | 7 ++++++-
    1 file changed, 6 insertions(+), 1 deletion(-)

    --- 38/fs/exec.c~5_doc_acct_arg_size 2011-02-25 18:05:27.000000000 +0100
    +++ 38/fs/exec.c 2011-02-25 18:05:34.000000000 +0100
    @@ -164,7 +164,12 @@ out:
    }

    #ifdef CONFIG_MMU
    -
    +/*
    + * The nascent bprm->mm is not visible until exec_mmap() but it can
    + * use a lot of memory, account these pages in current->mm temporary
    + * for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we
    + * change the counter back via acct_arg_size(0).
    + */
    static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)
    {
    struct mm_struct *mm = current->mm;


    \
     
     \ /
      Last update: 2011-02-25 19:05    [W:0.020 / U:62.508 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site