Passthrough block device
gurney_j at efn.org
Sun Oct 26 10:07:00 PST 2003
Sean Hamilton wrote this message on Wed, Oct 22, 2003 at 15:40 -0700:
> Does FreeBSD support a device that will allow for the passing of all reads
> and writes on it to a userland application? I wish to handle swapping
> myself, preferably without any kernel hacking.
Take a look at geom_gate from Pawel Dawidek. You could probably very
easily modify the client side to do your own code, instead of passing
it over the network to the server.
> What would happen if the kernel decided to swap out such a process?
Probably a deadlock... you could partially avoid this by using mlock
to prevent your process from swapping. It may still be possible to dead
lock due to the stack of the process being able to be swapped out.. some
one better versed in the process/VM interaction should answer that.
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-hackers