Date: Thu, 15 May 1997 19:12:10 +0100 From: James Mansion <james@westongold.com> To: freebsd-hackers@freebsd.org Subject: Re: mmap() Message-ID: <337B51FA.52F9@westongold.com> References: <199705151709.KAA15089@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote: > This is not to say the situation is hopeless; you *could* crank up the > sequential I/O performance of mmap(), at a cost of a save and compare > in the general page fault case. What would have to happen is the vnode > would have to notice on one fault that the page faulted immediately > before for the same vnode was the immediately previous page, and then > it would predictively "fault ahead" instead of the block I/O subsystem > noting that the read is sequentialy and predictively faulting ahead. > > Maybe you can convince John Dyson that coding this would be fun (it > might even actually *be* fun 8-)), and then checking the degradation > this causes in the general case to see if it's unacceptably high for > your special case. I can't see that this would be a high cost. You'd only tell the real benefit on a loaded system anyway. Could you even use the simpler and hugely kludgy approach of 'if the faulting process' descriptor has sequential access, then fault the next <n> pages' where <n> is some tunable value? Factor 2 degradation seems a big hit, particularly when using a technique that 'should' be efficient, but maybe this would be cheap and remove much of the performance hit? The technique you mention is more along the lines of one that one might use for cases where the MADV_SEQUENTIAL 'hint' has NOT been given and you still want a heuristic to identify when sequential access is nevertheless occuring locally, as might be the case with (say) a DBMS. In this case, the hint is plainly given and you might act on it more directly. What happens for executable image pages? Do those get any readahead now? > > Regards, > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. James -- Westongold Ltd C++/Java Multithread development and libraries +44 1920 444284 info@westongold.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?337B51FA.52F9>