Path: utzoo!attcan!uunet!island!hue From: hue@island.uu.net (Jon Hue - "Bo knows windsurfing?") Newsgroups: comp.unix.internals Subject: Re: How do I find my buffers once I have lost them? Summary: use physio()? Keywords: kernel virtual sigio Message-ID: <2170@island.uu.net> Date: 8 Nov 90 19:51:43 GMT References: <18747.27394289@windy.dsir.govt.nz> Organization: Island Graphics Corp., San Rafael, CA Lines: 20 In article <18747.27394289@windy.dsir.govt.nz>, sramtrc@windy.dsir.govt.nz writes: > the buffer has an address in the kernel virtual space. Suppose the kernel > wants to send the user buffer to a device in several transfers. This is > easy because the kernel tells the device the address of the buffer, starts > the transfer, and waits for an interrupt from the device. > > When the kernel gets the interrupt how can it find the user buffer again > (assuming it has been locked into memory) to do the next transfer? The Unless I'm missing something here, you should try to write your driver so you can use physio(). physio() will handle breaking up the transfer into chunks the device can deal with, pin down the memory, and then call your strategy routine to perform the I/O operation. Are you under some sort of real-time contraint which requires you to start the next I/O operation from the interrupt level? It's much simpler if you can just wakeup the sleeping process from the interrupt level, and wait for it to start running (still inside physio()) again. Jonathan Hue Island Graphics Corp. uunet!island!hue hue@island.com