9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eric Dorman eld@jewel.ucsd.edu
Subject: [9fans] Re: etherelnk3.c
Date: Tue, 30 Dec 1997 11:05:22 -0800	[thread overview]
Message-ID: <19971230190522.f_duBuPJ9BGAWGwlwzmUo4yKSCTdSXCSMjZWeZa0a6k@z> (raw)

> From gdb@dbSystems.com Mon Dec 29 17:36:38 1997
> Date: Mon, 29 Dec 1997 19:20:46 -0600
> From: eld@jewel.ucsd.edu (Eric Dorman)
 
> >Definately worth a look; I've got a 9pcfs that allows the use
> >of IDE disks for filesystems
> Why?  I agree IDE disks are very attractive from a $$/MB point
> of view, but you can't get enough of them on a machine.  The
> overall $$/MB is less with SCSI since you can aggregate the cost
> of the CPU/RAM over more disks.  Also, IDE is PIO and that
> is a bad place to waste CPU resources.

Well, one doesn't *have* to use PIO mode on IDEs, one can use
the supposed-DMA modes :)   Consider as well that it's unlikely 
that CPU is a premium in the fs; more likely it's bounded by 
network or disk bandwidth (offhand).  Besides, CPU is cheap on PCs,
and fs's aren't doing anything else.

With 8-9G EIDEs readily available, 32-36G is a goodly-sized 
magnetic level, and considerably cheaper than SCSI for the size 
range.  Around here SCSIs are ~2x-2.5x per G for ultrawide, and
1.5-2x for fast.  For the scope that I'm working in, 32G is 
fine for primary storage even.  Certainly the long-run cost 
amortization for SCSI is better, but that's only relevant
if it's going to be realized...

Of course the current support in the fs is for pretty slow
scsi controllers, from what I've seen.  One could stick a 
PCI controller that looks like an AHA1542 in there but the 
driver wouldn't utilize 32-bit addressing, forcing the use of
bounce buffers...  hmm, didn't some of the VLB cards have 
a larger address space?
  
> >                             and have found that the network
> >is far and away the limiting factor (10Mbit/sec 10BaseT on NE2000s)
> If you use two transmit buffers, sending one and filling the other,
> you will find much more "network" in your NE2000.  [I don't use
> the NE2000 anymore now that I have the 3c515 working! Not for the
> 100bT, but for the 64k of RAM and busmaster transfers!]

Well, whatever NE2000 mode being used in the cdrom for fs
is what I'm using.  I haven't dredged into it to see how it's
running the wire.

I don't recall offhand seeing 3C515 support in the code; is there
a boddle for it?

> >and 100BaseT is practically free these days; I'd love to use 100BaseT.
> Not when you look at the price/performance of 10bT full duplex switches
> and 100bT hubs.  100bT full duplex switches are nice, and expensive.

Sure, if you're building your own WAN network from the ground-up.  
We have much switched 10bT infrastructure already in place and some
switched 100bT sections (fiber backbone) so it doesn't cost me 
anything :) (at least at work) .. 100bT dumb hubs are plenty 
cheap ($50-70), fine for local runs and (hidden behind routers)
tightly-coupled fileservers and workstations.  

[xx] 
> >            Might even be able to interleave across primary and 
> >secondary IDEs (if the braindead chipsets will support it..). 
> No need, filsys main [h0h1] will interleave for you.

If h0 and h1 are on the same IDE controller you won't get
overlapping operations (unlike SCSI) since a single IDE 
controller can't do more than one thing at a time.  W/o 
overlapping the operations [h0h1] isin't a big win over 
(h0h1) (though better use of the on-disk caches is a help). 

On the other hand, lets say you have controllers h0 and h1, each 
with disks 0 and 1.  Then you can say [h0.0h1.0] and get two 
operations running at the same time (one on controller 0 and
another on controller 1).  The question, however, whether 
the chipsets will do it.

I suspect that the win from [h0.0h1.0] over [h0h1] will
be less than [h0h1] is over (h0h1) because of the on-disk
caches...

> >So far I've had to scramble around in the fs code changing 'long's
> >to 'ulong's in bytewise size computations and changing the type
> >of disk block addresses to ulongs; the matched-pair of 3.5G disks
> >breaks 'long's.  I'm worrying though that this may have caused
> >my block tag bug. 
> Very possible.  I looked at doing a global long to ulong change
> but found some places that weren't easy to fix (I don't remeber
> where now), so I left it alone.  I was thinking of reducing the
> block size and needed more blocks.  If you leave the block size
> at 4K, and handle the multiplier like devwren does, then you
> shouldn't need to make that change.

Well, I found out what the problem was; stupidity on my part =:)
I forgot that the fs was basically multithreaded and ended up
reusing a buffer at the driver-level before the fs-level got
to it... ick.  Eliminated an intermediate copy too.  Now 
everything seems to work (for h0); big files, root fs, etc.
with ulong block addresses and file sizes.  Several builds 
and boots so far and no trouble.  It's off to h0.1 and h1.? 
land :)  I have to kick it in the butt with big files before
I'm happy with it though.

> >                                I chose the former as an
[h typecode in port/sub.c]
> >easier solution but it's, well, icky; changing stuff in
> >fs/port is evil since I'd have to stub out 'ideread/idewrite'
> >in all other architectures.  
> Why?  Use different names.  
[xx]

What do you mean by 'use different names'?  Seems to me that if
port/sub.c references ideread/idewrite for type Devide
you'll have to have a ideread/idewrite stub in every set of 
architecture-specific drivers (not just pc) since you have
to satisfy that reference somewhere.  Unless, of course, you 
compile port/sub.c (with #ifdefs or something, more yuk) 
differently for, say, sparcs, than for pcs.  Am I missing something?

> >Seems to me a better solution would be to have the hardware-specific 
> >initialization stuff build a table describing the disks connected
> >to the box (complete with codeletters, size, traps into the
> >hardware driver, etc) and have fs/port/sub.c go indirect
> >through the table to the hardware.
> 
> Maybe.  I like the way it is now because my mirror code likes
> to know that a disk is missing (for whatever reason) and then
> know that it is available again later (a reboot cleared the error,
> or the drive was replaced.)  The config block is written to a
> mirror set with "config {w0.0w1.0}" and it tells you what the system
> is suppose to look like even if it doesn't look like that now.
> I have caused drive and controller failures and the system
> just takes the drive (or all the drives on a failed controller)
> off line and keeps running.  When the system is fixed and rebooted,
> it finds the mirrors needing recovery and does it.  Even if it
> is booted with the drives sick, it does the right thing.

Yeah;  If OTOH the table indexed controllers (which is the
real problem part anyway) rather than disks themselves, the 
only time the fs would have trouble is if it booted with a 
broken controller.  
 
> David Butler
> gdb@dbSystems.com

Regards,

Eric Dorman
edorman@ucsd.edu





             reply	other threads:[~1997-12-30 19:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-30 19:05 Eric [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-01-02 21:54 jim
1997-12-31 17:14 Eric
1997-12-31 15:10 jim
1997-12-31  8:54 Nigel
1997-12-31  6:49 G.David
1997-12-31  5:16 jim
1997-12-31  3:51 G.David
1997-12-31  2:41 jim
1997-12-30  1:20 G.David
1997-12-29 20:25 Eric
1997-12-24  4:30 jim
1997-12-15 18:14 G.David
1997-12-15 17:43 Eric
1997-12-14 16:37 G.David
1997-12-13 18:04 G.David

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=19971230190522.f_duBuPJ9BGAWGwlwzmUo4yKSCTdSXCSMjZWeZa0a6k@z \
    --to=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).