From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Paul Menage <menage@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
serue@us.ibm.com, penberg@cs.helsinki.fi,
linux-kernel@vger.kernel.org
Subject: Re: [Fwd: [-mm] Add an owner to the mm_struct (v9)]
Date: Thu, 17 Apr 2008 09:08:27 +0530 [thread overview]
Message-ID: <4806C633.3000302@linux.vnet.ibm.com> (raw)
In-Reply-To: <20080415195950.GA113@tv-sign.ru>
Oleg Nesterov wrote:
> 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
>
real_parent is for ptraced processes right?
> 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);
> }
>
I had this loop earlier (inspired from zap_threads()), is this loop more
efficient than what we have?
> Still. can't we make mm->mm_users_list ?
>
I suspect that will be expensive to maintain. Specially with large number of
threads. I see a large space overhead and time overhead and additional
synchronization overhead. Apart from finding the next owner is there any other
advantage?
> Oleg.
>
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
next prev parent reply other threads:[~2008-04-17 3:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-14 14:13 [Fwd: [-mm] Add an owner to the mm_struct (v9)] Balbir Singh
2008-04-14 14:49 ` Pekka Enberg
2008-04-14 16:04 ` Paul Menage
2008-04-14 19:36 ` Andrew Morton
2008-04-14 21:06 ` Pekka Enberg
2008-04-15 0:07 ` Andrew Morton
2008-04-15 17:13 ` Oleg Nesterov
2008-04-15 18:13 ` Paul Menage
2008-04-15 19:59 ` Oleg Nesterov
2008-04-17 3:38 ` Balbir Singh [this message]
2008-04-17 11:30 ` Oleg Nesterov
2008-04-17 16:34 ` Paul Menage
2008-04-17 16:19 ` Oleg Nesterov
2008-04-17 17:40 ` Balbir Singh
2008-04-17 17:08 ` Oleg Nesterov
2008-04-17 17:50 ` Paul Menage
2008-04-17 19:07 ` Balbir Singh
2008-04-17 17:49 ` Paul Menage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4806C633.3000302@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=oleg@tv-sign.ru \
--cc=penberg@cs.helsinki.fi \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.