The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Larry McVoy <lm@mcvoy.com>
To: Dan Cross <crossd@gmail.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] FreeBSD behind the times? (was: Favorite unix design principles?)
Date: Thu, 4 Feb 2021 09:46:50 -0800	[thread overview]
Message-ID: <20210204174650.GC13701@mcvoy.com> (raw)
In-Reply-To: <CAEoi9W7aAJD-s+2xx+cvbDq76+WyAUVCcsT3GsNXr_TN9+wPpA@mail.gmail.com>

+1 to everything Dan said, including the "who cares if it works?".

I was definitely coming at it from the kernel perspective, I joined Sun
just after SunOS 4.0 came out; that was the release that made mmap/page
cache be a coherent thing, the buffer cache was almost completely gone,
I think it was still used for inodes and directories but no user data
was in there.

The amount of work that went into that was huge but the resulting kernel
was actually smaller (I think) and much easier to understand and maintain
(I know).  And the kernel team was quite proud of that work, with good
reason.

Which is why it blows my mind that the same organization that saw the
value of have one way to do things, did a 180 and said the page cache
isn't that important.  When I talked to the ZFS guys about it, their
plan was that ZFS was going to be the only local file system so it sort
of didn't matter.  But that's nonsense, you are going to have tmpfs,
nfs, vfat, ntfs, whatever apple uses, etc.  So you are going to have a
page cache for all of those, which means the page cache is never going
away, which means that mmap() wants pages (remember, you can mmap stuff
that isn't in memory, you need the hardware to fault for you so you can
go get it).  The ZFS guys said making that work is too hard, we did it
in BitKeeper, it works fine.  

So the combination of going back to something anyone with OS smarts 
knows is a bad idea plus the fact that I know from personal experience
that they could have done in the page cache and still have compression
and XOR, yeah, I lost a lot of respect for those guys.  

ZFS is very useful, it could have been that and played nice with the 
page cache.

On Thu, Feb 04, 2021 at 11:32:31AM -0500, Dan Cross wrote:
> On Thu, Feb 4, 2021 at 10:47 AM Will Senn <will.senn@gmail.com> wrote:
> 
> > [snip]
> >
> > In response to the negative vibes around ZFS. [snip]
> >
> 
> I think the discordance is around the semantics ZFS's implementation
> implies. Larry's point about mmap() vs a buffer cache is entirely valid; it
> took lots of people heroic amounts of work worthy of Greek sagas to bridge
> the difference between the original buffer and VM page caches, but ZFS
> says, "meh. too much work; not worth it." The practical implication of that
> is that memory mapped IO (via `mmap`) is no longer coherent with file IO
> (via `open`/`close`/`read`/`write`) without lots of work that both degrades
> performance and add complexity.
> 
> The question that a lot of folks who use ZFS regularly ask is, "does that
> matter?" And perhaps it doesn't: if I've got a file server sitting there
> serving NFS, do I care what it's kernel is doing? As long as it's
> saturating the network and disks, and it's reliable...not really.
> (Incidentally, that was kind of the philosophy behind the original plan9
> file server kernel...as I heard the story, the rate of change of the plan9
> kernel proper was too high, so Ken split off the file server portion into
> its own, special-purpose kernel, and it stayed like that for ~20 years).
> Similarly, if I'm on the local machine and the required coherence code is
> there and largely works, then again, perhaps as a consumer of the
> filesystem, I just don't care. After all, one can still get work done, and
> ZFS has a bunch of other features that make it very attractive, right? In
> particular, it's very good at NOT losing my data, kernel purity be damned.
> 
> On the other hand, if we're discussing OS design and implementation,
> (re)splitting the VM and buffer caches is a poor decision. One might well
> ask, "why?" and the answer may be, "because it adds significant complexity
> to the kernel." This to me seems like the crux of the disagreement.
> Satisfied users of ZFS might legitimately ask, "who cares?" and one might
> respond, "kernel maintainers." If the kernel is mostly transparent as far
> as a particular use case goes, though, then I can see why one would bulk at
> the suggestion that this matters. If one is concerned with the design and
> implementation of kernels, I could see why one would care very much.
> 
> Like many things, it's a matter of perspective.
> 
>         - Dan C.

-- 
---
Larry McVoy            	     lm at mcvoy.com             http://www.mcvoy.com/lm 

  parent reply	other threads:[~2021-02-04 17:47 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 11:10 [TUHS] Favorite unix design principles? Tyler Adams
2021-01-25 12:32 ` Steve Nickolas
2021-01-26  2:06   ` M Douglas McIlroy
2021-01-26  2:53     ` Steve Nickolas
2021-01-26 10:22     ` Tyler Adams
2021-01-26 12:26       ` John P. Linderman
2021-01-26 15:23       ` Clem Cole
2021-01-26 16:00         ` Niklas Karlsson
2021-01-26 16:13           ` Adam Thornton
     [not found]       ` <CAKH6PiXKjksEpQOMMMQTbcsMvX2thz3WzqjoRWJAsXnZ4Eq_iQ@mail.gmail.com>
2021-01-30 19:01         ` Tyler Adams
2021-01-30 19:50           ` Jon Steinhart
2021-01-30 20:06             ` Tyler Adams
2021-01-30 21:28               ` Clem Cole
2021-01-30 21:42                 ` Dave Horsfall
2021-01-30 21:45                 ` Tyler Adams
2021-01-30 22:31                   ` Larry McVoy
2021-01-30 22:28                 ` Larry McVoy
2021-01-30 23:11                   ` [TUHS] FreeBSD behind the times? (was: Favorite unix design principles?) Greg 'groggy' Lehey
2021-01-30 23:17                     ` Larry McVoy
2021-01-30 23:22                       ` Warner Losh
2021-01-30 23:31                         ` [TUHS] [SPAM] " Larry McVoy
2021-01-30 23:37                           ` Jon Steinhart
2021-01-30 23:54                             ` Larry McVoy
2021-01-31 12:23                               ` [TUHS] [SPAM] Re: FreeBSD behind the times? Dermot Tynan
2021-01-31  0:00                             ` [TUHS] [SPAM] Re: FreeBSD behind the times? (was: Favorite unix design principles?) Bakul Shah
2021-02-09  2:15                         ` [TUHS] " Will Senn
2021-02-09  2:16                           ` Will Senn
2021-02-09  2:30                             ` Greg 'groggy' Lehey
2021-01-31  0:39                     ` Steve Nickolas
2021-01-31  1:47                     ` Will Senn
2021-01-31  2:25                       ` Larry McVoy
2021-01-31  2:52                         ` Will Senn
2021-01-31  3:00                           ` Larry McVoy
2021-01-31  3:06                             ` Will Senn
2021-01-31  3:32                               ` John Cowan
2021-02-04  5:43                         ` Dave Horsfall
2021-02-04  6:10                           ` Angus Robinson
2021-02-04  7:46                             ` Andy Kosela
2021-02-04 22:25                             ` Dave Horsfall
2021-02-04 15:45                           ` Will Senn
2021-02-04 16:03                             ` Henry Bent
2021-02-04 16:32                             ` Dan Cross
2021-02-04 16:49                               ` Will Senn
2021-02-04 17:46                               ` Larry McVoy [this message]
2021-02-04 18:41                               ` Bakul Shah
2021-02-04 22:28                                 ` George Michaelson
2021-02-04 22:41                                   ` Bakul Shah
2021-02-05  0:33                                   ` Larry McVoy
2021-02-05  5:17                                     ` Bakul Shah
2021-02-05 14:18                                       ` Larry McVoy
2021-02-05 18:16                                         ` Warner Losh
2021-02-05 18:21                                         ` ron minnich
2021-02-06  0:03                                         ` Bakul Shah
2021-02-06  2:06                                           ` Dan Cross
2021-02-06  3:01                                             ` Bakul Shah
2021-02-06  1:18                                         ` John Gilmore
2021-02-06  1:43                                           ` joe mcguckin
2021-02-06  1:55                                           ` Bakul Shah
2021-02-05 20:50                             ` Dave Horsfall
2021-02-06  0:21                               ` Brad Spencer
2021-02-06  2:22                               ` Rico Pajarola
2021-02-06  2:55                                 ` Larry McVoy
2021-02-06  3:07                                   ` Will Senn
2021-02-27  8:54                                   ` Stuart Remphrey
2021-02-06  4:55                               ` John Cowan
2021-02-04  7:46                         ` Chris Torek
2021-02-04 15:47                           ` Will Senn
2021-02-11 21:01                         ` Angel M Alganza
2021-01-30 23:09                 ` [TUHS] Favorite unix design principles? John Cowan
2021-01-30 23:22                   ` Jon Steinhart

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=20210204174650.GC13701@mcvoy.com \
    --to=lm@mcvoy.com \
    --cc=crossd@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).