Question about uiomove() in BSD Unix kernel

Question about uiomove() in BSD Unix kernel

Post by shuvam mis » Wed, 24 Feb 1993 14:38:22



This question is for those who are familiar with the internals of variants
of the BSD Unix system.

There is a routine called uiomove(), which implements I/O driven by a uio
data structure. This routine is used for data transfer during the read(2),
write(2), readv(2), writev(2) system calls, and for other data transfer to
and from the kernel and user space. The actual data copying is done by this
routine. It looks at information in the uio data structure supplied, to
decide whether it is a read or write, to/from system or user space, etc.
The number of bytes and addresses of the buffer are all specified as part
of this data structure, in an array of descriptors called the iov data
structure.

For a normal read(2) or write(2) system call, the iov array has only one
element, specifying one buffer address and one bytecount. For a scatter-
read or gather-write, the iov array has more than one element, one per
buffer. If the iov count is zero, it means, of course, that no I/O is
requested.

My question is: When is uiomove() called with zero iov count? It certainly
is called with a zero count sometime at kernel bootup time, during the
course of some system call. I might be able to find out which system calls
do it, but I can't figure out why anyone should. The observation is
repeatable: we get the debug message each time we boot the kernel, at
exactly the same places.

We are working on OSF/1.0, a version of Unix based on AT&T and BSD4.3.
Needless to say, I can't disclose source, but since uiomove() is a part of
the BSD source which is available to the public without licensing, I guess
I can ask this question.

Will someone please help? I'd appreciate answers by email. If there is
enough interest, I'll summarise and repost.
                                                                Shuvam


-- Research Engr, Mach Project ----------------------------------------------
-- Dept of Computer Science -------------------------------------------------
-- Indian Instt of Technology, Bombay 400076 --------------------------------