sendfile(2) SF_NOPUSH flag proposal
Igor Sysoev
is at rambler-co.ru
Fri May 30 03:09:28 PDT 2003
On Fri, 30 May 2003, Terry Lambert wrote:
> Igor Sysoev wrote:
> > On Fri, 30 May 2003, Terry Lambert wrote:
> > > It doesn't "read" it, per se: it creates a mapping, and it
> > > faults the pages; when they are in core, then they can be
> > > sent.
> >
> > So what do these lines in /sys/kern/uipc_syscalls.c:sendfile():
> >
> > if (!pg->valid || !vm_page_is_valid(pg, pgoff, xfsize)) {
> > ....
> > error = VOP_READ(vp, &auio, IO_VMIO | ((MAXBSIZE / bsize) << 16),
> > p->p_ucred);
> > ....
> > }
>
> That's easy: they mean you aren't looking at version 1.147 of
> the file, and that you're looking at RELENG_4, and not -CURRENT
> (version 1.65.2.17, or earlier). You are 82 HEAD revisions
> behind the state of the art.
Yes, I looked in FreeBSD 4.x. In the HEAD VOP_READ() was changed to:
error = vn_rdwr(UIO_READ, vp, NULL, MAXBSIZE,
trunc_page(off), UIO_NOCOPY, IO_NODELOCKED |
IO_VMIO | ((MAXBSIZE / bsize) << 16),
td->td_ucred, NOCRED, &resid, td);
What does vn_rdwr() ? Does it fault the page as you said or it reads pages ?
Igor Sysoev
http://sysoev.ru/en/
More information about the freebsd-arch
mailing list