On 2025-08-18 01:03,
terry-...@glaver.org wrote:
> On Sunday, August 17, 2025 at 6:04:46 PM UTC-4
b...@softjar.se wrote:
>
> On 2025-08-17 23:52,
terry-...@glaver.org wrote:
> > What I was referring to was the potential for some code to
> overflow its
> > overlay (which is quite unlikely unless an overlay is REALLY
> close to full).
> > The documentation says something like "move modules between over-
> > lays until you get a clean link, but don't move these specific
> modules..."
>
> Some day, we really should write a small document explaining how to
> understand and move things around between the overlays. It's actually
> pretty simple, but I've never seen any documentation going through it.
>
>
> I though I saw a "just shuffle stuff until it fits" document recommending
> looking at the sizes of the .o files to see if one could go in a
> different over-
> lay.
Of course, that can be done. But it's not a very good way of doing
things. When you get the error about an oversized overlay (heck, you can
check even when none is oversized), you should run size on unix.
Output will look something like this:
simh:/home/bqt> size /unix
text data bss dec hex
54976 6118 33768 94862 1728e total text: 114304
overlays: 7744,7488,8128,7296,2240,8064,4928,5696,7744
(of course, you should check unix in the current directory, and not the
one at root if compile fails).
There you see the size of each overlay, and each overlay can, for the
kernel, not be larger than 8K. So that way you see which overlays needs
something moved away.
And then you check the Makefile, where you have all these
OV1= sys_generic.o ufs_syscalls.o vfs_vnops.o
OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o
OV3= kern_time.o sys_process.o ufs_mount.o ufs_subr.o uipc_syscalls.o
OV4= dkbad.o kern_sig.o mem.o subr_xxx.o trap.o tty_pty.o tty_tty.o
OV5= quota_kern.o quota_ufs.o quota_sys.o ufs_bmap.o \
sys_pipe.o
(and a bunch more)
And then pick something reasonable from the oversized overlay and move
it somewhere else. There are plenty of overlays with lots of free space,
and a bunch that aren't even having a single byte in them. So that is
fairly simple. (You can use anything up to OV15.)
> Historically, overlay 6 (I think it was) was almost always getting too
> big. I think/hope things got changed around some and this now isn't
> usually a problem. But moving almost anything around is not a problem.
> You might possibly want to consider performance issues, and be careful
> if passing pointers to functions in different overlays.
>
>
> It depends on what version of 'config' wrote the Makefile. GENERIC has an
> ID of "2.14 (2.11BSD) 2001/8/3" while 'config SPC11E' produces a Makefile
> with an ID of "2.10 (2.11BSD GTE) 1997/11/28". Odd.
Maybe it's time we did some update/correction to config itself? :-)
The difference is because different bits of makefile gets picked up from
/sys/config depending on what kernel you configure.
So it's not any difference in config itself that cause this.
> Anyway, my SPC11E Makefile has a very misleading comment:
> # OV6 gets the (hopefully) never used routines
> OV6= clock.o dn.o init_main.o kern_pdp.o machdep2.o subr_prf.o
> syscalls.o \
> subr_log.o vm_swp.o
>
> Part of that would seem to be rather commonly used code. I have a weird
> overlay structure for SPC11E as it is based on the Chase Covello sort-of-
> 482* kit which expects RA disks and TU tapes, but I'm moving it to RM05/
> TU77 drives for more historical accuracy (the Unibus on an 11/70 is a last
> resort for high-speed peripherals like a UDA50). So I put the xp driverin
> base and demoted the [T]MSCP stuff to OV9, pending removal complete-
> ly.
Agreed. Comment is very misleading.
Moving things to base is fine, as long as it stays below 56K in size.
Parts of ufs, as well as parts of syscalls are also in overlays, so it's
difficult to tell what actually will generate a more efficient system.
Overlays aren't extremely costly anyway, as it's just a few instructions
to potentially change the MMU mapping, and then call.
And the one really nice things about overlays in 2.11BSD is that you can
freely call between any overlays, and also at return, the mapping is
adjusted as well, so in that sense it's way simpler than overlays in DEC
OSes.