Subject: Re: direct I/O again
To: Chuck Silvers <chuq@chuq.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 04/03/2006 20:44:30
chuq@chuq.com said:
> struct uio used to have a proc pointer, which I could pass to
> uvm_vslock().  now it only has a vmspace pointer, so I had to change
> uvm_vslock() to adapt. this really makes more sense anyway

There is an issue wrt checking of wired memory against system limits.
To get at the per-process limits a proc pointer is needed.
uvm_vslock() doesn't check; this makes sense for transient things where
performance is important and where the caller does a bounds check, as
in physio().
There are cases however where a check against uvmexp.wiredmax and/or
p_rlimit[RLIMIT_MEMLOCK].rlim_cur is appropriate -- implement another
vslock()-like call for these cases?

best regards
Matthias