From: Daniel Jacobowitz <dan@debian.org>
To: "Kevin D. Kissell" <kevink@mips.com>
Cc: Dominic Sweetman <dom@algor.co.uk>,
Ralf Baechle <ralf@oss.sgi.com>,
Ulrich Drepper <drepper@redhat.com>, Mike Uhler <uhler@mips.com>,
"MIPS/Linux List (SGI)" <linux-mips@oss.sgi.com>,
"H . J . Lu" <hjl@lucon.org>
Subject: Re: thread-ready ABIs
Date: Tue, 22 Jan 2002 12:57:47 -0500 [thread overview]
Message-ID: <20020122125747.A18040@nevyn.them.org> (raw)
In-Reply-To: <00d801c1a36c$ef0719e0$0deca8c0@Ulysses>
On Tue, Jan 22, 2002 at 06:47:55PM +0100, Kevin D. Kissell wrote:
> > > Anyway, do you see a hole or a serious performance
> > > problem with my modified proposal (explicit mmap()
> > > to create the necessary storage)?
> >
> > Same problem as with clone. I recommend the clone manpage; it says:
> >
> > CLONE_VM
> > If CLONE_VM is set, the calling process and the child
> processes run in the same
> > memory space. In particular, memory writes performed by the
> calling process or
> > by the child process are also visible in the other process.
> Moreover, any mem
> > ory mapping or unmapping performed with mmap(2) or munmap(2)
> by the child or
> > calling process also affects the other process.
> >
> > If CLONE_VM is not set, the child process runs in a separate
> copy of the memory
> > space of the calling process at the time of clone. Memory
> writes or file map
> > pings/unmappings performed by one of the processes do not
> affect the other, as
> > with fork(2).
> >
> > That is, if any memory OR MAPPING is shared, they all are.
>
> Daniel, you didn't read my message. The per-thread memory
> would be allocated *after* the clone() in pthread_create().
> More specifically, pthread_create() would set it up so that
> the function passed to clone for invocation was in fact a
> wrapper that sets up the memory and thread data before
> invoking the application function passed to pthread_create().
>
> Now, if the idea is that the clone() system call is supposed
> to cause the thread to be born, like Athena, full-grown from
> the head of Zeus, with the analog to the thread register
> already set up when it leaves the kernel, then I would be inclined
> to concede that we need to change the ABI, the kernel, and
> compilers, and I would ask just what we get for our trouble.
> But if we are permitted the pthreads abstraction, there's a
> lot that can be done transparently.
No, you didn't read my manpage quote, Kevin. Or we're just talking
past each other. The problem is not that existing mappings are shared,
but that "any memory mapping or unmapping performed with mmap(2)
or munmap(2) by the child or calling process also affects the other
process". That is, if the child maps some private storage, the parent
will see it too. Thus we can not use the private storage as a
thread-local storage unless we already have some thread-local way to
say where it is for this particular thread, and we're back where we
started.
Does that make sense, or am I missing your objection?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-01-22 18:57 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m3elkoa5dw.fsf@myware.mynet>
2002-01-18 18:19 ` thread-ready ABIs H . J . Lu
2002-01-18 18:31 ` Ulrich Drepper
2002-01-18 19:08 ` H . J . Lu
2002-01-18 19:20 ` Ulrich Drepper
2002-01-19 12:14 ` Dominic Sweetman
2002-01-19 12:14 ` Dominic Sweetman
2002-01-20 0:14 ` Ralf Baechle
2002-01-18 20:03 ` Maciej W. Rozycki
2002-01-18 20:20 ` Ulrich Drepper
2002-01-18 20:50 ` Maciej W. Rozycki
2002-01-18 21:02 ` Ulrich Drepper
2002-01-18 21:35 ` Maciej W. Rozycki
2002-01-18 21:44 ` Ulrich Drepper
2002-01-18 22:17 ` Maciej W. Rozycki
2002-01-18 21:23 ` Daniel Jacobowitz
2002-01-19 0:35 ` Kevin D. Kissell
2002-01-19 0:35 ` Kevin D. Kissell
2002-01-19 4:11 ` H . J . Lu
2002-01-19 12:27 ` Dominic Sweetman
2002-01-19 19:42 ` H . J . Lu
2002-01-21 13:27 ` Maciej W. Rozycki
2002-01-19 22:21 ` Kevin D. Kissell
2002-01-19 22:21 ` Kevin D. Kissell
2002-01-20 10:38 ` Machida Hiroyuki
2002-01-20 11:58 ` Kevin D. Kissell
2002-01-20 11:58 ` Kevin D. Kissell
2002-01-20 13:16 ` Machida Hiroyuki
2002-01-22 6:27 ` patches for test-and-set without ll/sc (Re: thread-ready ABIs) Machida Hiroyuki
2002-01-22 6:37 ` Ulrich Drepper
2002-01-22 6:46 ` Machida Hiroyuki
2002-01-22 6:56 ` Ulrich Drepper
2002-01-24 9:56 ` Andreas Jaeger
2002-01-24 9:56 ` Andreas Jaeger
2002-01-20 19:19 ` thread-ready ABIs H . J . Lu
2002-01-21 9:39 ` Kevin D. Kissell
2002-01-21 9:39 ` Kevin D. Kissell
2002-01-21 13:56 ` Maciej W. Rozycki
2002-01-21 18:24 ` H . J . Lu
2002-01-21 18:36 ` Ulrich Drepper
2002-01-21 18:52 ` H . J . Lu
2002-01-21 18:58 ` H . J . Lu
2002-01-21 18:59 ` Daniel Jacobowitz
2002-01-21 19:05 ` H . J . Lu
2002-01-21 19:09 ` Daniel Jacobowitz
2002-01-21 19:18 ` H . J . Lu
2002-01-21 21:04 ` Kevin D. Kissell
2002-01-21 21:04 ` Kevin D. Kissell
2002-01-21 19:30 ` Geoff Keating
2002-01-21 21:07 ` Ulrich Drepper
2002-01-21 13:43 ` Maciej W. Rozycki
2002-01-20 0:24 ` Ralf Baechle
2002-01-21 23:22 ` Ulrich Drepper
2002-01-21 23:57 ` Kevin D. Kissell
2002-01-21 23:57 ` Kevin D. Kissell
2002-01-22 0:16 ` Ulrich Drepper
2002-01-22 0:16 ` Ulrich Drepper
2002-01-22 9:37 ` Dominic Sweetman
2002-01-22 9:37 ` Dominic Sweetman
2002-01-22 17:41 ` Ulrich Drepper
2002-01-22 17:41 ` Ulrich Drepper
2002-01-22 9:59 ` Dominic Sweetman
2002-01-22 9:59 ` Dominic Sweetman
2002-01-22 12:18 ` Kevin D. Kissell
2002-01-22 12:18 ` Kevin D. Kissell
2002-01-22 15:21 ` Daniel Jacobowitz
2002-01-22 15:44 ` Dominic Sweetman
2002-01-22 21:44 ` Tommy S. Christensen
2002-01-22 21:53 ` Kevin D. Kissell
2002-01-22 21:53 ` Kevin D. Kissell
2002-01-22 23:13 ` Kevin D. Kissell
2002-01-22 23:13 ` Kevin D. Kissell
2002-01-23 1:12 ` Jason Gunthorpe
2002-01-22 16:05 ` Kevin D. Kissell
2002-01-22 16:05 ` Kevin D. Kissell
2002-01-22 16:34 ` Daniel Jacobowitz
2002-01-22 17:08 ` Kevin D. Kissell
2002-01-22 17:08 ` Kevin D. Kissell
2002-01-22 17:13 ` Daniel Jacobowitz
2002-01-22 17:34 ` Kevin D. Kissell
2002-01-22 17:34 ` Kevin D. Kissell
2002-01-22 17:37 ` Daniel Jacobowitz
2002-01-22 17:47 ` Kevin D. Kissell
2002-01-22 17:47 ` Kevin D. Kissell
2002-01-22 17:57 ` Daniel Jacobowitz [this message]
2002-01-22 18:18 ` Kevin D. Kissell
2002-01-22 18:18 ` Kevin D. Kissell
2002-01-27 20:24 ` Alan Cox
2002-01-27 20:24 ` Alan Cox
2002-01-28 8:50 ` Kevin D. Kissell
2002-01-28 8:50 ` Kevin D. Kissell
2002-01-22 1:39 ` Richard Henderson
2002-01-18 21:24 Justin Carlson
2002-01-18 21:31 ` Ulrich Drepper
2002-01-18 21:42 ` Maciej W. Rozycki
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=20020122125747.A18040@nevyn.them.org \
--to=dan@debian.org \
--cc=dom@algor.co.uk \
--cc=drepper@redhat.com \
--cc=hjl@lucon.org \
--cc=kevink@mips.com \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
--cc=uhler@mips.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.