How do I find my buffers once I have lost them?

Jon Hue - "Bo knows windsurfing?" hue at island.uu.net
Fri Nov 9 06:51:43 AEST 1990


In article <18747.27394289 at windy.dsir.govt.nz>, sramtrc at 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 at island.com



More information about the Comp.unix.internals mailing list