Subject: Re: nfs vs pagedaemon
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 04/07/2003 23:47:21
> On Mon, Apr 07, 2003 at 10:50:16PM +0900, YAMAMOTO Takashi wrote:
> > i found the problem.
> > because the file offset that corresponds to the page changes
> > in the case of swap and we're using byte-range of the file
> > to track commited/uncommited, we can't do unstable writes+commit for swap.
> I'm not sure I understand what you're saying here. Do you mean that
> the computed offset (computed using b_blkno) isn't correct for the
> pageout case? The offsets should be consistent inside the swapfile.

i meant, each uvm_swap_put puts the page to the different offset
in the swapfile while we need two nfs_doio, one for unstable writes
and one for commit.  so simply re-dirtying the pages, that is what my first
patch does, can't work.

besides, for anon pages, we have no way to clear PG_NEEDCOMMIT
when the server reboots.

> > the attached patch simply attempts stable writes in the case of pageout.
> > i'll commit this if no one objects.
> It'll kill pageout performance, though, but there is something to be
> said for it, since it'll get rid of the pages immediately.

yes, that's what i tried to avoid first.  but i gave up for now. ;-)
it's a bit difficult to deal with unstableness without exposing commit method
to outside of nfs...