9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Alexander Viro <viro@math.psu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] FreeBSD 4.0 / Plan9 3rd ed.
Date: Fri,  1 Sep 2000 19:34:14 -0400	[thread overview]
Message-ID: <Pine.GSO.4.10.10009011908150.6688-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <200009012258.SAA02080@cse.psu.edu>



On Fri, 1 Sep 2000 forsyth@caldo.demon.co.uk wrote:

> >>thread==process. There is a rfork() equivalent (clone(2)) and model is
> >>exactly the same as on Plan 9 (process as a set of components that can be
> >>shared between several processes; fork() as a special case of more generic
> 
> no it is not equivalent.
> would that it were.

You can have multiple stacks. If anything, work by ESP is better than by
TSS. "Current stack pointer" makes sense on most of architectures. TSS
doesn't.

Lack of stack-splitting is not an accident - stack is not a magic object.
It's just an anonymous mapping with MAP_GROWSDOWN in flags.
<checks the manpage>
<damn>
OK, so it's time for patch to mmap.2. Omitted piece being:

	MAP_GROWSDOWN	created mapping will behave like a stack - grow
			downwards upon pagefaults. Stacks are not
			special in any respects - they are nothing but
			anonymous mappings that can grow.

Sorry. That makes my original reaction somewhat over-the-top. Umhm...
OK, I'll look through the thing (drawterm, that is) and try to see what
can be done.

Anyway, TSS hack is doomed - it's not going to work on 2.4. We used to
allocate a separate TSS for each task, but that essentially forced a TLB
flush upon every context switch. And it hurts a lot. Current kernel has a
TSS per CPU and does needed updates by hands - it turned out to be faster
than jump on TSS. So something has to be done anyway. Yes, 2.4 is not
released yet, but you can be 100% sure that this change will not be
reverted.



  reply	other threads:[~2000-09-01 23:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-01 22:56 forsyth
2000-09-01 23:34 ` Alexander Viro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-09-02  7:30 nigel
2000-09-01 22:04 jmk
2000-09-01 19:59 Russ Cox
2000-09-01 20:45 ` Alexander Viro
2000-08-30 16:46 presotto
2000-08-30 10:13 lucio
2000-08-30 11:06 ` Nigel Roles
2000-08-30 11:08 ` Nigel Roles
2000-08-30 16:29 ` William K. Josephson
2000-08-30 16:47   ` Lucio De Re
2000-08-30  9:12 Wilhelm B. Kloke
2000-08-30 10:02 ` Nigel Roles
2000-08-30 16:27 ` William K. Josephson

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=Pine.GSO.4.10.10009011908150.6688-100000@weyl.math.psu.edu \
    --to=viro@math.psu.edu \
    --cc=9fans@cse.psu.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).