Subject: Re: direct I/O
To: None <chuq@chuq.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/02/2005 07:32:52
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