From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21725 invoked from network); 3 Jun 2020 00:40:32 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 3 Jun 2020 00:40:32 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id EEDDE9CAF2; Wed, 3 Jun 2020 10:40:28 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 37B8F9CA34; Wed, 3 Jun 2020 10:40:01 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LkCNqw/T"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id B611C9CA34; Wed, 3 Jun 2020 10:39:58 +1000 (AEST) Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by minnie.tuhs.org (Postfix) with ESMTPS id AB4C19C96B for ; Wed, 3 Jun 2020 10:39:57 +1000 (AEST) Received: by mail-vs1-f54.google.com with SMTP id q2so397478vsr.1 for ; Tue, 02 Jun 2020 17:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K+Dk+zJ4TqyRhIc3Tvzhbot10UjMZV4gW2+L4FoQzaE=; b=LkCNqw/TQyAl4kQoL4Fo+QJS2Ba4+afYQBCHJeyaxS9zyyb+iciWCj9NwrxDICsWsV PEzTEdyBZ3+fncLmLHyx9zdVYf2KIbg81HkbCefqfulgI3Vw45F/M3sZ16tHu7/Fn106 KMZ7C52vMuZNtgyZxy4nAnj+de9gxCJLMDLRhOo8eRmi79PW2YbbR/GmglfT8X3+Roer QqxAhqpGz+lJkls6J+dPRAnoYR4C7fpJNqKouyZZd6sgWtjZ+uoDiRbpo2A462debz0s kGTVwGwGWt9JPI8fUzrUZHWtm40d1uKiezS5poWLYDVQr5/RBFfFfn0lz/lHWWfOZ0jY 1g1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K+Dk+zJ4TqyRhIc3Tvzhbot10UjMZV4gW2+L4FoQzaE=; b=hgpB/G2lCf2GflNL5H+xRDNGTaPeuavqmz1iDwA8xSS8Jr9R+rscb9wNMrupD8naHm tJWk2UthKUldPzC6CVJ2xV1SSlLAyjMbSnEM3f3smpnw8IWgdAcwI28rQm47lx0GXS+l TNyBTKnj5UlxzElLEh9UL0YrsYprjuPvq96X4cITrT52vmJjmZ0x53PG9zLuMBYeoDIJ X0rFccrAC2MCS4M2Z7gNa0/sBjrL0oc/4wP1a0fo4fKQTKSaTFynBg/9qJn2JzY8iyhj gx8HOX00dnTHLGV3ofVNDq2n7im1jFFAYrIe6okGyVW2ttShO1YdoFlSzweqAQMk2fU8 q2tA== X-Gm-Message-State: AOAM533F0ChMJ5VgxuyWoA5WohERROmuvS6Udg+IkwCvf0/U/mQniob2 j/j2eCX4f968kW0rrCA08MkBNjl4xnOa5UBAolpfqC+r X-Google-Smtp-Source: ABdhPJwpnOIyze8ESkRcPsnm3pOvHpZOvRXtIbRkBcKUvRp8F4xksDqMZBczhfyZ7bpuTWXBELV1kO5HK2x73kKVnJE= X-Received: by 2002:a05:6102:10ce:: with SMTP id t14mr12374900vsr.164.1591144796572; Tue, 02 Jun 2020 17:39:56 -0700 (PDT) MIME-Version: 1.0 References: <202006021759.052Hx5Et022619@freefriends.org> <515ABF82-79D4-4DB8-90F1-4DDD512C7706@serissa.com> <202006022203.052M3wpa167150@darkstar.fourwinds.com> <20200602232114.GA22016@mcvoy.com> In-Reply-To: <20200602232114.GA22016@mcvoy.com> From: Rob Pike Date: Wed, 3 Jun 2020 10:39:45 +1000 Message-ID: To: Larry McVoy Content-Type: multipart/alternative; boundary="00000000000062cf3905a7234439" Subject: Re: [TUHS] non-blocking IO - threads X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000062cf3905a7234439 Content-Type: text/plain; charset="UTF-8" See the description of rfork at http://man.cat-v.org/plan_9/2/fork. -rob On Wed, Jun 3, 2020 at 9:21 AM Larry McVoy wrote: > 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 > --00000000000062cf3905a7234439 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
See the description of rfork at=C2=A0http://man.cat-v.org/plan_9/2/fork.

<= /div>
-rob


On Wed, Jun 3, 2020 at 9:21 AM Larry McV= oy <lm@mcvoy.com> wrote:
On Wed, Jun 03, 2020 at = 09:09:08AM +1000, Rob Pike wrote:
> The first mistake people made was to split "thread" from &qu= ot;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, y= our
processes are too fat".

Years ago, I asked Linus if he could fix the one flaw with that point
of view.=C2=A0 Which is, processes can't share page tables.=C2=A0 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.=C2=A0 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.=C2=A0 man 2 clone on a
Linux box.=C2=A0 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
--00000000000062cf3905a7234439--