lkml.org 
[lkml]   [2008]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [-mm] Add an owner to the mm_struct (v9)
    KAMEZAWA Hiroyuki wrote:
    > maybe I don't undestand correctlly...
    >
    > On Thu, 10 Apr 2008 14:46:02 +0530
    > Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
    >
    >>
    >> +config MM_OWNER
    >> + bool
    >> +
    > no default is ok here ? what value will this have if not selected ?
    > I'm sorry if I misunderstand Kconfig.
    >

    The way this works is

    If I select memory resource controller, CONFIG_MM_OWNER is set to y, else it
    does not even show up in the .config

    >
    >> + /*
    >> + * Search through everything else. We should not get
    >> + * here often
    >> + */
    >> + do_each_thread(g, c) {
    >> + if (c->mm == mm)
    >> + goto assign_new_owner;
    >> + } while_each_thread(g, c);
    >> +
    >
    > Again, do_each_thread() is suitable here ?
    > for_each_process() ?
    >

    do_each_thread(), while_each_thread() walks all processes and threads of those
    processes in the system. It is a common pattern used in the kernel (see
    try_to_freeze_tasks() or oom_kill_task() for example).

    > Thanks,
    > -Kame
    >


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


    \
     
     \ /
      Last update: 2008-04-11 06:57    [W:0.023 / U:30.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site