tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] netbsd32 swapctl, round 3

On Sat, Feb 01, 2014 at 08:41:15AM +0000, Emmanuel Dreyfus wrote:
> Hi
> Here is my latest attempt at netbsd32 swapctl. I had to make uvm_swap_stats()
> available to emul code, but that seems to be what it was intented for,
> according to comments in the code.

I've just looked at the code in uvm_swap_stats().
Might be easier to either clone the entire loop, or pass in a helper
function which is passed the 'sdp' and 'inuse' fields.

Even for the 'normal' case that would save copying the pathname twice.
It isn't as though a lock is released before the copyout.
The read lock is held throughout.


David Laight:

Home | Main Index | Thread Index | Old Index