Newsgroups: comp.os.minix
Subject: Re: Problems changing click size
References: <HrvQ2.20551$cq3.692908@news.uswest.net>
Organization: Rochester Institute of Technology, Rochester, NY
From: aje9383@osfmail.isc.rit.edu (Andrew Erickson)
NNTP-Posting-Host: grace.isc.rit.edu
X-Original-NNTP-Posting-Host: grace.isc.rit.edu
Message-ID: <37129037.0@isc-newsserver.isc.rit.edu>
Date: 12 Apr 1999 20:30:47 -0500
X-Trace: 12 Apr 1999 20:30:47 -0500, grace.isc.rit.edu
Lines: 58
XPident: aje9383
X-Original-NNTP-Posting-Host: 129.21.3.100
XPident: Unknown
Path: star.cs.vu.nl!newsfeed.amsterdam.nl.net!sun4nl!EU.net!howland.erols.net!news-peer1.sprintlink.net!news-in-central.sprintlink.net!news.sprintlink.net!isc-newsserver.isc.rit.edu!aje9383
Xref: star.cs.vu.nl comp.os.minix:35208

In article <HrvQ2.20551$cq3.692908@news.uswest.net>,
Johnathon McAlister <maccer@uswest.net> wrote:
>As some of you may be aware, I'm trying to get MacMinix running on a
>Performa 6200 w/ 32 MB of RAM.  My first thought was to store clicks in
>32-bit longs instead of the current 16-bit ints, keeping clicks at 256
>bytes.
>
<snip -- this is a stopgap mesure to increase productivity>
>
>My first attempt has not worked - I went into "includes/minix/const.h" and
>changed the values of CLICK_SIZE and CLICK_SHIFT to 2048 and 11.  I then did
>a "make" (with no command line options) in "src/mm/", "src/fs/",
>"src/kernel", and "src/tools" - this resulted in a file "NEWmacboot". 
>However, on launching it I get problems.  It launches, loads the kernel in
>stages, displays the TTY window, checks the serial devs (complains they
>aren't set up - like usual), and goes up to the point where it checks the
>printer (complains it isn't set up - like usual), then hits an illegal
>instruction in the kernel and does a kernel panic.
>
>I get this behavior in both the Performa and the Mac Plus environs - so I
>don't think it's the "32-bit" clean problem.

There is a (very poorly documented) dependency on the size of a click in
/usr/src/tools/macboot.c -- lines 18 and 19 read as follows:

#define ROUNDUPTOCLICK(amt)      (((amt) + 0xffL) & 0xffffff00L)
#define ROUNDDOWNTOCLICK(amt)    ((amt) & 0xffffff00L)

What we really want, of course, is something like

#define ROUNDUPTOCLICK(amt)      ((amt) + CLICK_SIZE - 1) & \
                                    ((long)-CLICK_SIZE))

or something equivalent.

>I note that during the compiles, I got several warnings about pointers being
>moved to ints, resulting in possible data loss.  I don't want to do too many
>compiles to solve this - it takes about 5 hours to rebuild the kernel after
>touching "const.h" - which is why I'm asking the group if they have any
>ideas...

Have you tried my SCSI disk driver?  It makes a significant difference in
the speed of a system--especially for disk-intensive things.  I never
actually timed the difference, but the system feels faster.  It does require
minix to have its own partition on a hard drive, however, which is a big
pain--especially if you don't have e.g. a little old one lying around
somewhere.  Availiable from my minix web page--
http://www.rit.edu/~aje9383/minix/
(Disclaimer:  While I use and trust this patch, and have had no trouble, and
believe it to be free from data-corrupting bugs, I make no guarantee of any
such thing and suggest backing up important data first...)

C68 is also a faster compiler, but I don't know if it is generally
availiable anymore--its home page disappeared without a trace, as far as I
can tell.  I could probably get a copy to you if you wanted.  I have version
4.5 beta, dated Jan 1, 1998.

--Andrew Erickson, aje9383@grace.isc.rit.edu
