From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id d6689479 for ; Tue, 27 Aug 2019 01:27:35 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id B62499BBF2; Tue, 27 Aug 2019 11:27:34 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0FD6B9BBDD; Tue, 27 Aug 2019 11:26:56 +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="H2mxysHg"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id CB54E9BB7B; Tue, 27 Aug 2019 11:26:54 +1000 (AEST) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by minnie.tuhs.org (Postfix) with ESMTPS id 6400D9BB5E for ; Tue, 27 Aug 2019 11:26:40 +1000 (AEST) Received: by mail-qk1-f182.google.com with SMTP id f10so1203711qkg.7 for ; Mon, 26 Aug 2019 18:26:40 -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=OlWVr5AZddwz8lydvvVbAac+1t6Q5lF2EqzVs/TTCQc=; b=H2mxysHgv+LTZd8gkaUggNq41XaAAgCCY26qGM2msMDjMLTwj0mchWf/WEmpHRB1jB gEGyWSpqlxLTfc/TrakMwWH1mDINQY0H/mleep/szLx/01MB4Vv+LdAKlFAdrCkEKs8l /MO6NEvlweirxEIKT/liinVM5c5VtPgvX6uEaDlWf6ml5Ki6TH/WoDsKjHE1ntA3oNQ4 kNyK0z3DYuTfcdtPZgf0nlkYhyPEgfF25ms1DzfdkT35XuhAP6zuO9q0VcxBfPD2OC9n vHOYAw/FvIszQYm8sBR+7ixGzKTYlV3g5s75UFKOmdVpk0bNBy/nV0wdKjJTG5Mvhyo2 tSKw== 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=OlWVr5AZddwz8lydvvVbAac+1t6Q5lF2EqzVs/TTCQc=; b=gPczBADUlUZq5Sv5tqRkYzIlQBWGUzmHQ2/Gas4gsscaEb0bsMhxyCzmZYAYr9IiTa HmLLKgQmAWAb8Wm2dvt/NIjyi0N3rreO3FXRmp3IfkJb7GISBzaVJC2DThtaHK9eAlY5 qLeVjfpPKAdhWmrLxfdITJ0ODQrKxgQ6Upkqow4oMpl2ZBIqXYt8YdbBQX9wdYWic2S1 LBLXArQlnwAC6Nklk/gFzBIJ7J3wyge+hvwQXKEsM01Yfr9slPn2pGeMkU3s5VNiqka3 LLtneVSYKZSntaNJDZr1LEDeqtcvNiPQwA05Gc+6tULnP05CprYYbKS0stLzBzf9AYH+ Fwgw== X-Gm-Message-State: APjAAAWCRslBI0ZDSdJgqO17oi+rgfIfVW7M6scmRjidpxr/6lvd88GE uJ3pDTRo/vhwc8dVgTdxpn3l+g5Tv1NuPz/i/AVXGg== X-Google-Smtp-Source: APXvYqwASI9xiH0yIR7Qfw8zxaNK91vNi+iTceoIaLigJ7/ljCTGTrmC/YBZ6ighqNDAaOBJbi0mUZt2ZNez8t5tlrA= X-Received: by 2002:a37:9802:: with SMTP id a2mr19510088qke.346.1566869198928; Mon, 26 Aug 2019 18:26:38 -0700 (PDT) MIME-Version: 1.0 References: <13c5c36e-c84d-e020-d09e-51c8c502dc6d@kilonet.net> <75a32043-4830-ba04-ee0f-023c5f5ade3f@gmail.com> <20190827003013.GS13570@mcvoy.com> <312b39a1-2944-100f-55e0-fc65b504d43d@kilonet.net> In-Reply-To: <312b39a1-2944-100f-55e0-fc65b504d43d@kilonet.net> From: Dan Cross Date: Mon, 26 Aug 2019 21:26:27 -0400 Message-ID: To: Arthur Krewat Content-Type: multipart/alternative; boundary="00000000000002ff8305910f2a94" Subject: Re: [TUHS] If not Linux, then what? 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" --00000000000002ff8305910f2a94 Content-Type: text/plain; charset="UTF-8" On Mon, Aug 26, 2019, 9:00 PM Arthur Krewat wrote: >[snip] > > As for what mmap() doesn't do right, I started using memory mapped files > back in the early 80s on VMS on a VAX-11/780 when I and a colleague were > converting a database from TOPS-10 to VMS. Perhaps I am misunderstanding > your dislike for mmap() but please, enlighten me. It was my > understanding at the time that it was akin to swapping/virtual-memory > using an MMU. The difference was that instead of using the main paging > area, the kernel would use an actual file. Why would mmap() be a bad > thing, when it's hooked into the kernel, and possibly hardware, at such > a low point? I don't mean to put words in Larry's mouth, but I think he meant that ZFS bypasses the OS page cache, so that file IO and mmap use a different buffering scheme that is not mutually consistent. So a process could mmap() a file, write to it via a pointer indirection, and then invoke read() at a relevant offset and (perhaps) not see the earlier write reflected; or vice versa. It's not that mmap is a priori bad, but rather that ZFS has this unfortunate corner case related to mmap. - Dan C. --00000000000002ff8305910f2a94 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 26, 2019, 9:00 PM Arthur Krewat wrote:
>[snip]

As for what mmap() doesn't do right, I started using memory mapped file= s
back in the early 80s on VMS on a VAX-11/780 when I and a colleague were converting a database from TOPS-10 to VMS. Perhaps I am misunderstanding your dislike for mmap() but please, enlighten me. It was my
understanding at the time that it was akin to swapping/virtual-memory
using an MMU. The difference was that instead of using the main paging
area, the kernel would use an actual file.=C2=A0 Why would mmap() be a bad =
thing, when it's hooked into the kernel, and possibly hardware, at such=
a low point?

I don't mean to put words in Larry's mouth, but I think h= e meant that ZFS bypasses the OS page cache, so that file IO and mmap use a= different buffering scheme that is not mutually consistent. So a process c= ould mmap() a file, write to it via a pointer indirection, and then invoke = read() at a relevant offset and (perhaps) not see the earlier write reflect= ed; or vice versa. It's not that mmap is a priori bad, but rather that = ZFS has this unfortunate corner case related to mmap.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- Dan C.

--00000000000002ff8305910f2a94--