Subject: Re: direct I/O again
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 04/04/2006 09:04:21
On Mon, Apr 03, 2006 at 08:44:30PM +0200, Matthias Drochner wrote:
> 
> 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().

direct I/O is another transient case, it is very much like physio.
(I've thought about merging the implementations eventually,
but I don't want to go there quite yet.)


> 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?

what cases do you see that need such a check that do not already have one?

-Chuck