9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] The creepy WORM. (was: Re: Thinkpad T61 Installation Experience)
Date: Sat, 19 May 2012 20:13:08 -0700	[thread overview]
Message-ID: <20120520031308.C9D3EB827@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Sat, 19 May 2012 00:45:58 +0200." <23ED89F3-F760-428A-8CF4-0A046F52675B@lsub.org>

On Sat, 19 May 2012 00:45:58 +0200 Francisco J Ballesteros <nemo@lsub.org>  wrote:

> > Just curious.
> > If the tree doesn't fit in memory, how do you decide who to
> > kick out? LRU? Sounds much like a cache fs. What does it buy
> > you over existing cache filesystems? Speaking more generally,
> > not just in the plan9 context.
>
> lru for clean blocks. but you really have the tree you use in memory, all if
> it fits.  what it buys is simplicity, thus reliability, and speed.
> instead of a single program doing everything, you have several trying to use
> their memory and to avoid copying blocks in the main server.
> plus, it's going to be modified to exploit the upcoming nix zero copy framework.

This last point is more or less independent of the FS (as long
as an io buffer is page aligned and io count is a multiple of
page size).

> it's not cow. you reuse the memory of a frozen block instead of copying.
> you just melt it and reuse it.

> all this is in memory. cow happens only on the disk, but you don't wait for that.
> that's the main difference wrt others.

How often would you flush to disk? You still need to worry about the order
of writing metadata.

> >>          When the disk gets full, all reachable blocks are marked and
> >>          all other blocks are considered available for growing the
> >>          log (this is a description of semantics, not of the imple-
> >>          mentation). Thus, the log is circular but jumps to the next
> >>          available block each time it grows.  If, after the mark pro-
> >>          cess, the disk is still full, the file system becomes read
> >>          only but for removing files.
> >
> > Why does circularity matter? It would make more sense to allocate
> > new blocks for a given file near its existing blocks regardless of
> > writing order.
>
> for simplicity, I removed most of the fanciest things I had before in place in
> previous versions that could be a source of bugs. there are no ref. counters,
> for example. it's designed to operate on
> main memory, and it seems it does well even though the disk algorithms are
> naive.

You do have to keep track of free disk blocks. On disk. So a linked list
would require you visit every freed block.

> > Why not just use venti or some existing FS underneath than
> > come up with a new disk format?
>
> to avoid complexity, latency, and bugs.

I think an incore FS the easy case but you will have to face
the issues of corner/boundary cases, various error conditions
and efficiency when dealing with real disks. These things are
what introduce complexity and bugs. "Soft updates" in FFS took
quite a while shake out bugs.  zfs took a long time.  Hammer
fs of DragonFly took a while. Pretty much every FS design has
taken a while to be rock solid.  Far longer than the original
estimates of the designers I think.

> that was the motivation, exploiting large main memories and keeping things
> simple and reliable. Time will tell if we managed to achieve that or not :)

Ah. I have been looking at SBCs with memories in the 128MB to
512MB range! Can't afford an incore FS!

But even if there is gigabytes of memory why would I want to
dedicate a lot of it to a filesystem? Most of the FS data is
going to be "cold" most of the time. When you suddenly need
lots of memory for some memory intensive computation, it may
be too late to evacuate the memory of your FS data. But
memory is just a file cache, this data can be thrown away any
time if you need more space.  And by making sure the cache
holds a bounded amount of dirty data, you lose no more than
that amount of data in case of a crash.

> sorry I wrote in Sioux this time. its been a long day here :)

Thanks for taking the time. Always nice to see yet another
attempt at getting this right :-)



  reply	other threads:[~2012-05-20  3:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 12:24 [9fans] Thinkpad T61 Installation Experience Burton Samograd
2012-05-16 12:32 ` Bruce Ellis
2012-05-16 12:49   ` Burton Samograd
2012-05-16 13:00     ` Peter A. Cejchan
2012-05-16 14:43   ` Martin Harriss
2012-05-16 15:00     ` Skip Tavakkolian
     [not found]     ` <CAJSxfmLZE3aNGmMusb=ZJAwn1AZEHuDxCeXJrRLADn+WV0KUEw@mail.gmail.c>
2012-05-16 15:02       ` erik quanstrom
2012-05-16 16:06         ` Charles Forsyth
2012-05-16 13:14 ` David du Colombier
2012-05-16 13:23   ` sl
2012-05-16 16:19     ` Burton Samograd
2012-05-16 16:34       ` cinap_lenrek
2012-05-17 12:39         ` Burton Samograd
2012-05-17 13:12           ` Jack Norton
2012-05-17 13:29             ` Burton Samograd
2012-05-17 14:01             ` erik quanstrom
2012-05-17 15:37           ` cinap_lenrek
2012-05-17 15:45             ` Burton Samograd
2012-05-17 16:00               ` cinap_lenrek
2012-05-18 21:13                 ` [9fans] The creepy WORM. (was: Re: Thinkpad T61 Installation Experience) Nemo
2012-05-18 22:22                   ` Bakul Shah
2012-05-18 22:45                     ` Francisco J Ballesteros
2012-05-20  3:13                       ` Bakul Shah [this message]
2012-05-20  8:37                         ` Charles Forsyth
2012-05-20  8:38                         ` Charles Forsyth
2012-05-20 10:07                         ` Francisco J Ballesteros
2012-05-17 15:48             ` [9fans] Thinkpad T61 Installation Experience erik quanstrom
     [not found]             ` <D2A5C7470D67A54FACE86B838946D49D14E466F852@NJ4MSGSCR02.markit.pa>
2012-05-17 15:57               ` erik quanstrom
2012-05-17 16:09             ` David Romano
2012-05-17 16:26               ` erik quanstrom
2012-05-17 19:43                 ` [9fans] +t and bind (Was Re: Thinkpad T61 Installation Experience) David Romano
2012-05-18 14:48                   ` Ethan Grammatikidis
     [not found]         ` <CAM8pOuM+TDRPjkiWPENr_5qA0Mi5R=-ytmQSA1_ruUmQ54YbGw@mail.gmail.c>
2012-05-17 13:11           ` [9fans] Thinkpad T61 Installation Experience erik quanstrom
2012-05-17 13:28             ` Burton Samograd
2012-05-17 14:08           ` erik quanstrom
2012-05-17 14:49             ` Burton Samograd
2012-05-16 13:51   ` Nicolas Bercher
2012-05-16 14:05     ` erik quanstrom
2012-05-16 14:25       ` Charles Forsyth
2012-05-16 14:31       ` David du Colombier
     [not found]       ` <CAOw7k5jBKN2bxUov=Dagn1aL6nA_OORN+G8iPnkOzvf8mbScyw@mail.gmail.c>
2012-05-16 14:34         ` erik quanstrom
2012-05-16 14:18     ` David du Colombier
2012-05-16 14:21     ` cinap_lenrek
2012-05-16 14:36       ` erik quanstrom
2012-05-16 13:44 ` Nicolas Bercher

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=20120520031308.C9D3EB827@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /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).