Date: Fri, 30 May 2003 13:23:02 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> To: Terry Lambert <tlambert2@mindspring.com> Cc: arch@freebsd.org Subject: Re: sendfile(2) SF_NOPUSH flag proposal Message-ID: <Pine.BSF.4.21.0305301302540.58337-100000@is> In-Reply-To: <3ED71B19.339E8A95@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 May 2003, Terry Lambert wrote: > Igor Sysoev wrote: > > > FreeBSD, NetBSD, OpenBSD, Darwin. > > > > There's no sendfile() implementation in NetBSD and OpenBSD. If you > > apply some experimental patch you can easy fix some non-portable issues. > > Or you could just fix sendfile. 8-). I'm going to fix it as Matthew Dillon suggested if no one else is going to do it in the near future. > > By the way what's about kqueue(2) ? Are you not confused that NetBSD > > does not support EVFILT_AIO and OpenBSD does not support EVFILT_AIO and > > EVFILT_TIMER ? Does this mean that FreeBSD should not introduce any > > new kqueue filters or flags ? > > These are incredibly trivial to support. I estimate the work > at an hour each, including writing a unit test. It took me > about an hour to write the SystemV IPC Message Queue KNOTE() > code for FreeBSD. Nevetheless there's no support for EVFILT_AIO and EVFILT_TIMER. By the way I do not think that EVFILT_AIO is a trivial thing. Actually it requires at least the working AIO enviroment in the kernel. Now we have more portable kqueue() that exists in FreeBSD, NetBSD, and OpenBSD (I do not know about Darwin and MacOS X) with the same prototype and some unsupported filters. And we have much less portable sendfile() that exists in the most modern unices but with the different prototypes and functionality. > > I agree but I told not about the blocking on a page fault but the blocking > > on the reading the file page from a disk by sendfile(). These pages > > can be preloaded. > > 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); .... } Igor Sysoev http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0305301302540.58337-100000>