lkml.org 
[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] user-vm-unlock-2.5.31-A2

On Fri, 16 Aug 2002, Ingo Molnar wrote:
>
> okay. And it also makes sense for a newly forked task to know (and cache)
> its own PID, without having to call getpid() again.

Well, it won't. The pid write is _after_ we've done the copy_mm(), so the
child will never see it.

That looks like a potential mistake, though - it causes extra COW-faults
and it also means that this particular optimization (which I kind of like)
won't work.

However, if you want to fix it, you'd need to either move the
clone_thread() earlier, or you'd need to move the CLONE_SETTID logic up to
the generic layer (that latter path may make more sense, since if glibc
starts using this interface, you obviously need to do this in all
architectures anyway)

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:1.083 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site