Subject: Re: direct I/O
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 03/02/2005 00:09:26
hi,

correct on all counts.  I've updated the patch.

-Chuck


On Wed, Mar 02, 2005 at 07:32:52AM +0900, YAMAMOTO Takashi wrote:
> hi,
> 
> > 	ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/diff.directio
> 
> >	const int pgoflags = PGO_CLEANIT | PGO_FREE | PGO_SYNCIO;
> 
> do you think PGO_FREE is a good idea even when rw == UIO_READ?
> 
> >	(void) VOP_PUTPAGES(vp, off, off + len, pgoflags);
> 
> you need trunc_page() and round_page().
> 
> >	kva = uvm_km_valloc_wait(phys_map, len);
> 
> i think you mean klen.
> 
> >		rv = pmap_extract(upm, uva + poff, &pa);
> >		KASSERT(rv);
> >		pmap_enter(kpm, kva + poff, pa, prot, prot | PMAP_WIRED);
> 
> uva (thus pa) isn't page-aligned here.
> 
> YAMAMOTO Takashi