Article View: news.software.nntp
Article #30028Re: madvise() works (!)
From: Matt Dillon
Date: Sun, 26 Jul 1998 00:00
Date: Sun, 26 Jul 1998 00:00
50 lines
2827 bytes
2827 bytes
:In article <6pgjnb$5n1@newsops.execpc.com>,
:Joe Greco <jgreco@ns.sol.net> wrote:
:>In comp.unix.bsd.freebsd.misc article <6pg4rq$drt$1@flea.best.net>, dillon@best.net (Matt Dillon) wrote:
:..
:>bit more complex than on FreeBSD. However, the last time I actually looked
:>at the implementations was quite a while ago, so it's quite possible that
:>FreeBSD's implementation has surpassed the Solaris implementation (I would
:>tend to expect that of John Dyson, John we miss you!! ...)
:>I am quite happy to hear that these features might be used under Diablo,
:>someday soon, since I'm very aware of their performance-enhancing abilities.
It'l be in the next release.
:>(Did you ever integrate the poll-on-file stuff?)
:>
:>... JG
Yes, but it doesn't work perfectly. When you use the
POLLEXTEND extension to poll() on FreeBSD to poll for a
file append, it only poll's for a new append starting
when poll() was called. If the append occurs after the
read() (that returned EOF) but before the poll() call, it
misses it and unless another extend occurs it will not
return until the timeout period. What it really needs
to do for a normal file is check to see if the file's size
is larger then the current seek position and return
immediately if so, prior to waiting for an extend.
It's a small but very real window. So I kludged it... the
timeout is set to 1 second. Beyond that it works fine.
2437 dnewslink 0.000040 RET read 0
2437 dnewslink 0.000037 CALL stat(0x32f50,0xefbfcb34)
2437 dnewslink 0.000028 NAMI "/news/dqueue/nntp3"
2437 dnewslink 0.000088 RET stat 0
2437 dnewslink 0.000039 CALL poll(0xefbfcb2c,0x1,0x3e8)
2437 dnewslink 0.604183 RET poll 1
I am also using it to replace alarm() in the read loop to
handle the timeout, though, which is more useful. alarm() is a
relatively expensive syscall.
-Matt
--
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications
<dillon@best.net> (Please include original email in any response)
Technical Details
Message-ID:
<6pgona$8rs$1@flea.best.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<6pg4rq$drt$1@flea.best.net> <6pgjnb$5n1@newsops.execpc.com>Show Full Headers
Complete Article Headers
Message-ID: <6pgona$8rs$1@flea.best.net> Subject: Re: madvise() works (!) Date: Sun, 26 Jul 1998 00:00:00 +0000 From: dillon@best.net (Matt Dillon) References: <6pg4rq$drt$1@flea.best.net> <6pgjnb$5n1@newsops.execpc.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 375180169 X-Trace: 901506604 27810 dillon 206.184.139.131 Organization: Best Internet Communications, Inc. Newsgroups: news.software.nntp,comp.unix.bsd.freebsd.misc