The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: newsham@lava.net (Tim Newsham)
Subject: [Unix-jun72] Anyone working on V1 mkfs?
Date: Thu, 1 May 2008 16:08:47 -1000 (HST)	[thread overview]
Message-ID: <Pine.BSI.4.64.0805011559190.20114@malasada.lava.net> (raw)
In-Reply-To: <20080502005808.GA79200@minnie.tuhs.org>

> On another note, I thought of taking V6 mkfs.c as a start-point to rewrite
> V1 mkfs. I'm trying to work out what f_m and f_n do:
>
>        if(fsys[n] == 'r') {
>                if(f == 'k') {
>                        f_n = 24;	/* RK, why these numbers? */
>                        f_m = 3;
>                }
>                if(f == 'p') {
>                        f_n = 10;	/* RP, why these numbers? */
>                        f_m = 4;
>                }
>        }

Looks like they stagger the insertion of blocks onto the free list
so that they're not adjacent.  It first builds a table in adr[] of
the stagger offsets, then it frees blocks from the top linearly
until it hits a round number, then it allocates as many staggered
blocks as it can until finally returning to allocating the bottom
f_n blocks in a linear fashion again.  For example if f_n is 10 and
f_m is 4, and igh is 100 and low is 20 you puts blocks on the
list in this order:
     0,    - always zero first
     100   - linear at top
     99, 95, 91, 97, 93, 98, 94, 90, 96, 92, ...
     33, 38, 34, 30, 36, 32
     29, 28, 27, ... 22, 21, 20    -- linear at the bottom

as to why they chose these particular constants for these disks,
I can only guess that they figured having blocks roughly four
apart made for good performance due to read and seek latencies?

> Finally, are we going to use RK03 or RK05, as the sizes are different?

The sources mention "rk03" several times and give 4872 decimal as
the maximum block number allowed (and also rf0 with 1024 as maximum
block number).

> 	Warren

Tim Newsham
http://www.thenewsh.com/~newsham/



  reply	other threads:[~2008-05-02  2:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01 23:42 Warren Toomey
2008-05-01 23:45 ` Tim Newsham
2008-05-02  0:33 ` Brad Parker
2008-05-02  0:58   ` Warren Toomey
2008-05-02  2:08     ` Tim Newsham [this message]
2008-05-02  2:31     ` Warren Toomey
2008-05-02  2:45       ` Tim Newsham
2008-05-02  3:21       ` Tim Newsham
2008-05-02  3:51         ` Warren Toomey

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=Pine.BSI.4.64.0805011559190.20114@malasada.lava.net \
    --to=newsham@lava.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).