From: utzoo!decvax!harpo!eagle!mhuxt!mhuxa!houxm!ihnp4!ixn5c!inuxc!pur-ee!iuvax!isrnix!greg Newsgroups: net.unix-wizards Title: Unix buffers thought Article-I.D.: isrnix.197 Posted: Mon Apr 18 18:30:10 1983 Received: Fri Apr 22 20:44:28 1983 I just did some (very) rough calculations on cpu time consumed by the kernel copyin/copyout routines and I found that to copy a 1k buffer from kernel space to user space takes between 2425 and 3475 microseconds (depending on ratio of cache hits/non cache hits and such), or about 5.5 microseconds per word. This, to me, seems VERY slow, considering that our RM05 can (on a good day) transfer 1 word every 1.65 microseconds and even our RL02's cook along at 1 word every 4 microseconds. To add insult to injury, if a particular block is not in memory, you have to add the drive transfer time to the copy time, so for a non-cached buffer the transfer alone takes between 7 and 9 microseconds per word. Is seek latency a bad enough problem to justify this? Is there any way to cut down on kernel<->user copy time? Perhaps on small cpu-bound systems all I/O should be raw? Oh, by the way, the statistics are all taken from our PDP-11/44. Comments/opinions/flames ("What, all I/O RAW?!") are invited. Greg Travis decvax!pur-ee!isrnix!greg p.s. The copy routines we use are modified so that loop control overhead is minimal. p.p.s. I've considered using a kernel segmentation register to map into the users buffer area and using 'bcopy' to do the copy, but this seems more trouble than it's worth.