The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Larry McVoy <lm@mcvoy.com>
To: Rob Pike <robpike@gmail.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] non-blocking IO - threads
Date: Tue, 2 Jun 2020 16:21:14 -0700	[thread overview]
Message-ID: <20200602232114.GA22016@mcvoy.com> (raw)
In-Reply-To: <CAKzdPgxH=Ub-EZLmNnRR4W75ipqjt6a_UmwG5nPqwUDRopxOGw@mail.gmail.com>

On Wed, Jun 03, 2020 at 09:09:08AM +1000, Rob Pike wrote:
> The first mistake people made was to split "thread" from "process". What
> those words mean today is not what they meant a generation ago.

So I'm a fan of your quote, Rob, "If you think you need threads, your
processes are too fat".

Years ago, I asked Linus if he could fix the one flaw with that point
of view.  Which is, processes can't share page tables.  So N processes
will have N page tables, need an N way bigger TBL, to get the same
performance.

What I asked Linus to try and do is allow a process to share all or
part of its page table with another process.  If that could be done,
we could pretty do what you said, just use processes and if they want
to act like threads, just share the page table.

And I just looked, he seems to have done it.  man 2 clone on a
Linux box.  It's the swiss army knife of features, feels messy.

I don't know if CLONE_VM will share the page tables, I'll ask
Linus.

--lm

  reply	other threads:[~2020-06-02 23:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 14:19 [TUHS] non-blocking IO Paul Ruizendaal
2020-06-02 17:45 ` Paul Winalski
2020-06-02 17:59   ` arnold
2020-06-02 18:53     ` Paul Winalski
2020-06-02 19:18       ` Clem Cole
2020-06-02 21:15         ` Lawrence Stewart
2020-06-02 22:03           ` [TUHS] non-blocking IO - threads Jon Steinhart
2020-06-02 23:05             ` Rob Pike
2020-06-02 23:09               ` Rob Pike
2020-06-02 23:21                 ` Larry McVoy [this message]
2020-06-03  0:39                   ` Rob Pike
2020-06-02 23:12               ` Jon Steinhart
2020-06-03 16:42                 ` Paul Winalski
2020-06-03 17:57                   ` Jon Forrest
2020-06-03  5:38           ` [TUHS] Unix on the Arpanet Lars Brinkhoff
2020-06-03 12:23             ` Lawrence Stewart
2020-06-02 18:23   ` [TUHS] non-blocking IO Dan Cross
2020-06-02 18:56     ` Paul Winalski
2020-06-02 19:23       ` Clem Cole

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=20200602232114.GA22016@mcvoy.com \
    --to=lm@mcvoy.com \
    --cc=robpike@gmail.com \
    --cc=tuhs@minnie.tuhs.org \
    /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).