Messages in this thread | | | Date | Tue, 15 Apr 2008 23:59:50 +0400 | From | Oleg Nesterov <> | Subject | Re: [Fwd: [-mm] Add an owner to the mm_struct (v9)] |
| |
On 04/15, Paul Menage wrote: > > On Tue, Apr 15, 2008 at 10:13 AM, Oleg Nesterov <oleg@tv-sign.ru> wrote: > > > > Let's suppose the process with a lot of threads does exit_group() and nobody > > else uses this ->mm. How many time we will re-assign mm->owner and iterate > > over the all threads in system ? > > > > In general we won't get to the third loop, since one of the first two > loops (children or siblings) will find another mm user.
Well yes, the second loop checks parent->children ... all sub-threads have the same parent.
I'd suggest to use ->real_parent though. And the third loop could be
for_each_process(g) { c = g; do { if (!c->mm) continue; if (c->mm != mm) break; goto assign_new_owner; } while_each_thread(g, c); }
Still. can't we make mm->mm_users_list ?
Oleg.
| |