From owner-freebsd-arch@FreeBSD.ORG Fri May 30 03:09:28 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E2E737B401 for ; Fri, 30 May 2003 03:09:28 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97B5043F75 for ; Fri, 30 May 2003 03:09:27 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h4UA9QmF090562; Fri, 30 May 2003 14:09:26 +0400 (MSD) Date: Fri, 30 May 2003 14:09:26 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: Terry Lambert In-Reply-To: <3ED72A16.9CACD4C5@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: sendfile(2) SF_NOPUSH flag proposal X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 10:09:28 -0000 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/