Re: do_exit() and lock_kernel() semantics

Itai Nahshon (
Tue, 26 Mar 2002 12:11:51 +0200

On Monday 25 March 2002 21:25 pm, Kevin Pedretti wrote:
> The reason I ask is that I'm working on/modifying a set of modules that
> accesses user space from interrupt context.  I know this is not a good
> thing to do generally, but for performance reasons the original author
> wanted to copy directly into a mlocked user space buffer from a network

Some drivers (I know for sure about OSS drivers) do it the opposite way.

The driver allocates a buffer (or usually multiple buffers) in physical
memory. The buffers are directly accessible from the device hardware
for DMA etc. The interrupt routines normally would not touch the buffers
(although they could) but just tell the device how to use the buffers.

The user's process that needs to use the device can use the read/write
interface, or for better performance mmap the device (which maps
the buffers into a contiguous user space) and access the buffers directly.

With the mmap api, ioctls are used to tell the process how much new data
is available (for reading) or how much was consumed by the device (so
these buffers can be written with new data).

-- Itai
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at