Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!mmdf From: Glen Lalonde Newsgroups: comp.os.minix Subject: Better performance for 68K based minix? Message-ID: <51458@nigel.ee.udel.edu> Date: 22 Apr 91 02:09:08 GMT Sender: mmdf@ee.udel.edu Lines: 30 I found a message from way back in 89 about how to patch FS to call phys_copy directly thus you don't need to send/rec a message from the kernel to do the copy. Later the person indicated this patch did not work because the process may be shadowed. So I went about doing the same type of thing but this time with a fix to the shadow problem. FS gets informed when a fork happened, thus it knows which processes are shadowed. All you need to do is tell it when a exec occures. I modified the fproc table in fs to have an entry which indicates the process may be shadowed. In the fork processing of FS I set the bit true for the child and father. And now I have MM send a message to FS telling it when/who did a exec. At which point FS reset the bit in the fproc table. This does work in most cases, but not for the shell since it forks, child execs. Which will have the child set to no shadow but not the shell. No big deal most processes fork/exec. Anyways, what I do in FS rw_user is check the bit and call phys_copy if I know the process is not shadowed. This will reduce the number of messages by 2, from 4 or 6. See page 184 of the book. I did hope for a 5-15% decrease in time for reads/writes. I tried to measure the decrease by using about 10 lines of dd if=/dev/ram of=/dev/null bs=1024 count=500, in a shell then doing 'time' on the shell. What this showed was a decrease in user time from 8.0 to 4.5 BUT an increase in sys time from 1:18.0 to 1:21.0 or so. I really don't understand this, the copy is done in FS not kernel but both get rolled up in sys time.(correct?) Thus why the change? Is there a better way to measure this? BTW, real time was constant over the two cases both giving about 1:26.0 I am using MacMinix with a GCC compiled mm and fs.