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_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18860 invoked from network); 16 Jul 2021 16:11:44 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 16 Jul 2021 16:11:44 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 2AE0D9C81D; Sat, 17 Jul 2021 02:11:44 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id D13EC9C7F1; Sat, 17 Jul 2021 02:11:21 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=iitbombay-org.20150623.gappssmtp.com header.i=@iitbombay-org.20150623.gappssmtp.com header.b="yz8OVJtk"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 053249C7F1; Sat, 17 Jul 2021 02:11:20 +1000 (AEST) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by minnie.tuhs.org (Postfix) with ESMTPS id 16E589C7F0 for ; Sat, 17 Jul 2021 02:11:19 +1000 (AEST) Received: by mail-oi1-f171.google.com with SMTP id u15so11465907oiw.3 for ; Fri, 16 Jul 2021 09:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aGAvypJtG5AAuqwmC+8QT05i1XLdOVYKLwTLq1VV1lk=; b=yz8OVJtkfb28bTCG2xn3RL9mhhBvTOnKGowsLga+E0eItTWx1WyXxHCcOhCmb++p9+ WQCn+oWJ0u82d7SD8KVfOOme+oD7EiL3x47P8MrARDwSsP+Q8xLsBxtUJyDtlQ3jTR5Z 4L9xbulRjvlNbv/hno6f6H3eI52sMU4/wm5EXg0MfuiBqdX0TeUulSoLkMKsK0pMFcoz yZStcUuqeG5G4wAd2BCOWFHzWrf08F5/QEx7TeZzWKk870ogAcvKMCrh2VxX+S2QxZaO fY6SXMhBbBJWWgWDHw3nMa58V3PIbVhB3k+wlLM6T/XJw7TQrx2LxKtFwHBwp0WGVEI9 K2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aGAvypJtG5AAuqwmC+8QT05i1XLdOVYKLwTLq1VV1lk=; b=IBzj0TAm/pTF3X+mcoajDwSbEe+5L9fmFdAoOrIz8fiyGs4NXOckqsKTkaYK0ijgIZ raQaifzRpTpdZ5y0/QyfCIFbFLRhEVbg4fn6Ojatjb6FDSlmjMpSjESpS1Msztt2t072 h6aX/JSXaA4hkrYFF0c14dwF49uRWbemJvtBFaxoz0zGmh57IOhuWkXrBQaAz21vR/Zi sx+asCN8O54UqP8FYWl7T6jw4UsErv2Z86BYb8loRtVuoKLAiUkrl/x0yk3urfvep2B2 gbK6hXlvyEz9P5DhDuciNHLU6m5QGuyWE5njS9MlczMET+jnUwxroR5g5stO1sA94iYw gEjQ== X-Gm-Message-State: AOAM530qNrncFY/Ar2q+QdsB1H33Al1r2i+/b1lZ5PZJK5/6sbkH8GUZ 9MBjI57H8/Bgwp+DpmrJqbU65fZk3YHCvw== X-Google-Smtp-Source: ABdhPJwXiZ4KskMp3Pcit2OwpH+PIlIT7XxR77fHjo/5mJpuGJHG/tCn4EBEb/XC1oKKbj9QpzOaXA== X-Received: by 2002:a54:4703:: with SMTP id k3mr8618246oik.91.1626451878412; Fri, 16 Jul 2021 09:11:18 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id r204sm2093618oih.11.2021.07.16.09.11.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jul 2021 09:11:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) From: Bakul Shah In-Reply-To: <20210716135639.GI12733@mcvoy.com> Date: Fri, 16 Jul 2021 09:11:16 -0700 Content-Transfer-Encoding: 7bit Message-Id: <7DC2359B-93C7-4329-AF61-6078CB4B80EB@iitbombay.org> References: <213a4c11-3ab2-4b4a-8d6b-b52105a19711@localhost> <5777F7E6-062B-4C5A-9C98-36FFE6AC3414@stdio.com> <20210716135639.GI12733@mcvoy.com> To: Larry McVoy X-Mailer: Apple Mail (2.3654.100.0.2.22) Subject: Re: [TUHS] 386BSD released 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: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Jul 16, 2021, at 6:56 AM, Larry McVoy wrote: > > On Fri, Jul 16, 2021 at 09:00:58AM -0400, Theodore Y. Ts'o wrote: >> The trick that I used was two have two "flip buffers" which were >> dedicated for each serial port. One buffer would be filled by the >> interrupt handler, while the other would be buffer would be processed >> by the bottom half (read: software interrupt) handler. When the >> bottom half handler had emptied one buffer, it would check to see if >> there were any characters in the other buffer, and if so, flip the two >> and process the characters in that buffer. > > I'm pretty sure SGI used a similar approach for networking packets. This is somewhat h/w dependent. Ideally you want the h/w to do some buffering for streaming at full speed so that you don't need to take a per char or per packet interrupt. Hence NS16550 which used a 16 char FIFO. AMD LANCE used a ring of 2^N buffer descriptors. Intel 82586 used a linked list - don't recall if you had to make it a circular buffer. The early 3COM controller didn't buffer more than a packet and you had to copy it. As a contractor I did a couple of network drivers for 3rd party hardware for SGI in late '80s & early '90s. I don't recall any details now but in both cases the h/w did buffer up a bunch. Once things are handed to s/w, you have a lot more flexibility. Though I never liked the idea of splitting a packet up in multiple mbufs!