Conversation
|
Glad to see this improved version you've been talking about - as it exposes other problems in the C library. It is hard to see (and feel) these issues when you're running on QEMU all the time, as I am. I think I'm going to add an option to simulate real FD delays when running QEMU so that speed problems are more easily seen. I now see that most of the The situation gets worse with Have you found that |
|
The kernel buffer system should by rights be handling the problem of re-opening a file quickly, seeking and re-reading. So in some sense I'm a bit surprised at why I recently reduced the size of /etc/passwd to under 512 bytes (that matters for FAT, unlike MINIX's 1K block size), and /etc/group was already pretty small. The size of /dev on a MINIX 2880k floppy is 816 bytes. So all should be read and buffered. What's your take on why I have also noticed on some occasions when the kernel is in a strange state that |
|
Thanks, @ghaerr. That said, in a constrained setting, which I had, the new I believe the changes you're looking at for getpwent et al, library version, are very viable. BTW, I've been purposely avoiding 'plenty buffer' situations, which I suspect will void my ttyname optimizations - partly or completely. Actually, when running mostly off of floppy, booting off hd (or running qemu or xms buffers) is like a revelation.... |
I went back to my development notes on this to check if I missed something. I did. After the repeated reopens were eliminated, competition for buffers was a problem I two ways. One was performance, the other that the tool was interfering with the testing. So while at it, I went to town on eliminating whatever buffer accesses I could. The result - and running
Yes, I've seen this one too and it never made any sense. It will be interesting to see if the optimized version does that. I do suspect though, that it's just a QEMU peculiarity. I haven't seen it for a while, but then again I'm not using QEMU by far as much as you do.
|
The
pscommand has been unbearably slow on floppy based systems because of excessive disk reads.The problem was partly fixed in the previous
psPR by replacing thegetpwentopen and read of the/etc/passwdfile once per line of output with a localgetpwent-version that kept/etc/passwdopen. Good but still slow.The other contributor to the bad
psperformance was the ttyname lookup, which opened and scanned the entire/devdirectory for every line out output. This version keeps the/devdirectory open and also optimizes the search for tty devices in several ways.psperformance on floppy based systems with limited memory (such as L1 buffers only) is now quite good.Finally, while
pshas always done some sanity checking of the kernel data read from memory, it has just exited silently when the data didn't make sense. This version adds more sanity checking and prints a message recommendingpsbe recompiled if the expected kernel signature isn't found. Courtesy @ghaerr from the ELKS project.