From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id BC5B52211A for ; Wed, 19 Jun 2024 19:20:29 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id EB9C443A34; Thu, 20 Jun 2024 03:20:24 +1000 (AEST) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by minnie.tuhs.org (Postfix) with ESMTPS id 8A3F243A32 for ; Thu, 20 Jun 2024 03:20:17 +1000 (AEST) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-70346ae2c43so789814a12.1 for ; Wed, 19 Jun 2024 10:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1718817616; x=1719422416; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hjwZHziHS5yCK8kl7/57rFJvrE7RS1MmlwL4MZkF0kE=; b=Ratsnwq/dKkqWMGcU9o8m8uxSFow4tTaqvEx0DEHhg9XvuPGLNKjkqQ1S8pJmVuWiM aKo52loTrzLnhPmZTfTWaVqjI2L4abvJWryyDNQNI729Mr9Z6RMC3lSTXsiuXoYrbPi/ YQhPXYa7pebuozH3KJu1oXHXaF8i21+VlRGONCBCS25AKkIXHCibOUhevRbGxgmgSJEb MUUQmHKNZdLUDPglPJbXgVIGbYBvD9p9rP1RghEeP889tSSW6Q+lfSMCXws4OifcXL7s lEgdDrgMbwkNLSJTSYF5RyH2KQQRHUaXxPPiVwHBiznjqOTsZUTb5+DawB69rXhohgGZ Aj2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718817616; x=1719422416; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hjwZHziHS5yCK8kl7/57rFJvrE7RS1MmlwL4MZkF0kE=; b=kw6UJznPDy6TsR9ELqeH+q4U57S3mK6xmr8V6CLcSWBf9W6c0Bf67+ukE2wg4Att7L WZStoMGiHvexn7jEtJT5j427jcMCa2zZgcHLMrCnTlsoompT6p/6lKXxStVSDs8rgIhH YbOKyQ/4HEFVbYh9F37cDef++LSVLr3mx/q0U/Ff9OF/Cdcuv3gVUns8sKLeqGLwH3kP hW6xv1L1ww2PqK8QiMELYfWKCL/MfT/JwJmM1PP3B535tCD6Rs4NQlcYuZOxGLbcPlEQ mAOtmBADaVDaj7iA9PbQewAYLgVdflAXuJUFUeAbIXnmanywTGJWDbzPLkkFLzNruVBO LbSA== X-Gm-Message-State: AOJu0Ywq9rwhGS1kPUh7Ywp5w1a3B7fnLjkATh3iS+tmCGBdmKhmODK+ tBwkuSdu/mY1NhBt+PCM55pNUOguokk1SvPapULxsVAS02thJSbMMzk44a/ABf00y+zKHXkxuvn HVwNmIlQMnwm5tRfkbkssZa63+nd5sTJyF70CIYrI/iyiAZzDERg= X-Google-Smtp-Source: AGHT+IFMr79Yg+RgjTTZPd24VpHnH7AH2t3SIiPdGe/3H8bhbaQtnwGcP10Ow0+s+S/xl0m2Qt/8sVw6uiG387sS7nQ= X-Received: by 2002:a17:90b:23c9:b0:2ab:8324:1b47 with SMTP id 98e67ed59e1d1-2c7b3ba80c3mr4912769a91.15.1718817616346; Wed, 19 Jun 2024 10:20:16 -0700 (PDT) MIME-Version: 1.0 References: <20240619161720.B301E18C088@mercury.lcs.mit.edu> <202406191655.45JGtYjI008727@ultimate.com> In-Reply-To: <202406191655.45JGtYjI008727@ultimate.com> From: Warner Losh Date: Wed, 19 Jun 2024 11:20:04 -0600 Message-ID: To: Phil Budne Content-Type: multipart/alternative; boundary="00000000000074dae1061b416966" Message-ID-Hash: EN37GNNEQG4ORZ7G6VQ6PBZGWYJF4WS4 X-Message-ID-Hash: EN37GNNEQG4ORZ7G6VQ6PBZGWYJF4WS4 X-MailFrom: wlosh@bsdimp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tuhs@tuhs.org, jnc@mercury.lcs.mit.edu X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: [COFF] Re: Supervisor mode on ye olde PDP-11 List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --00000000000074dae1061b416966 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 19, 2024 at 10:56=E2=80=AFAM Phil Budne wro= te: > JNC wrote: > > Is there a document for 2.11 which explains in detail why they did that= ? > I > > suspect it's actually a little more complicated than just "more address > > space". > ... > > ... Switching overlays took a certain amount of > > overhead (since mapping registers had to be re-loaded); if all the > networking > > code ran in supervisor mode, the supervisor mode mapping registers coul= d > be > > loaded with the right thing and just left. > > That's my understanding... It allows mbufs to be mapped only > in supervisor mode... > Yea. that's a much better explanation than my glossed over 'more address space'. It's both to get more text space (overlays weren't infinite, and being a separate image allowed more selective communication across the interface boundary) and to provide some separation and allow for more data to be around easily (the BSD kernel didn't overlay data, which is technically possible on PDP-11, but the linker didn't support it). > https://minnie.tuhs.org/PUPS/Setup/2.11bsd_setup.html says: > > The networking in 2.11BSD, runs in supervisor mode, separate > from the mainstream kernel. There is room without overlaying to > hold both a SL/IP and ethernet driver. This is a major win, as > it allows the networking to maintain its mbufs in normal data > space, among other things. The networking portion of the kernel > resides in ``/netnix'', and is loaded after the kernel is > running. Since the kernel only looks for the file ``/netnix'', > it will not run if it is unable to load ``/netnix'' , sites > should build and keep a non-networking kernel in ``/'' at all > times, as a backup. NOTE: The ``/unix'' and ``/netnix'' > imagines must have been created at the same time, do not > attempt to use mismatched images. The ability to have boot tell > the kernel which network image to load is on the wish list (had > to have something take the place of wishing for disklabels > ;-)). > > https://wfjm.github.io/home/ouxr/ shows the code path for the socket(2) > syscall > Oh, that's nice. Warner --00000000000074dae1061b416966 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jun 19, 2024 at 10:56=E2=80= =AFAM Phil Budne <phil@ultimate.com= > wrote:
= JNC wrote:
> Is there a document for 2.11 which explains in detail why they did tha= t? I
> suspect it's actually a little more complicated than just "mo= re address
> space".
...
> ... Switching overlays took a certain amount of
> overhead (since mapping registers had to be re-loaded); if all the net= working
> code ran in supervisor mode, the supervisor mode mapping registers cou= ld be
> loaded with the right thing and just left.

That's my understanding... It allows mbufs to be mapped only
in supervisor mode...

Yea. that's a= much better explanation than my glossed over 'more address
s= pace'. It's both to get more text space (overlays weren't infin= ite, and being a
separate image allowed more selective communicat= ion across the interface
boundary) and to provide some separation= and allow for more data to be
around easily (the BSD kernel didn= 't overlay data, which is technically possible
on PDP-11, but= the linker didn't support=C2=A0it).
=C2=A0
https://minnie.tuhs.org/PUPS/Setup/2.11bsd_setu= p.html says:

=C2=A0 =C2=A0 =C2=A0 =C2=A0The networking in 2.11BSD, runs in supervisor mo= de, separate
=C2=A0 =C2=A0 =C2=A0 =C2=A0from the mainstream kernel. There is room withou= t overlaying to
=C2=A0 =C2=A0 =C2=A0 =C2=A0hold both a SL/IP and ethernet driver. This is a= major win, as
=C2=A0 =C2=A0 =C2=A0 =C2=A0it allows the networking to maintain its mbufs i= n normal data
=C2=A0 =C2=A0 =C2=A0 =C2=A0space, among other things. The networking portio= n of the kernel
=C2=A0 =C2=A0 =C2=A0 =C2=A0resides in ``/netnix'', and is loaded af= ter the kernel is
=C2=A0 =C2=A0 =C2=A0 =C2=A0running. Since the kernel only looks for the fil= e ``/netnix'',
=C2=A0 =C2=A0 =C2=A0 =C2=A0it will not run if it is unable to load ``/netni= x'' , sites
=C2=A0 =C2=A0 =C2=A0 =C2=A0should build and keep a non-networking kernel in= ``/'' at all
=C2=A0 =C2=A0 =C2=A0 =C2=A0times, as a backup. NOTE: The ``/unix'' = and ``/netnix''
=C2=A0 =C2=A0 =C2=A0 =C2=A0imagines must have been created at the same time= , do not
=C2=A0 =C2=A0 =C2=A0 =C2=A0attempt to use mismatched images. The ability to= have boot tell
=C2=A0 =C2=A0 =C2=A0 =C2=A0the kernel which network image to load is on the= wish list (had
=C2=A0 =C2=A0 =C2=A0 =C2=A0to have something take the place of wishing for = disklabels
=C2=A0 =C2=A0 =C2=A0 =C2=A0;-)).

https://wfjm.github.io/home/ouxr/ shows the code path for the s= ocket(2) syscall

Oh, that's nice.

Warner=C2=A0
--00000000000074dae1061b416966--