X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.177.20 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: DREADED fseek Organization: Systematic Software Message-ID: References: <8edus09uvkr9or13giuvdflk4ogin5q2l1 AT 4ax DOT com> <01c4ebed$Blat.v2.2.2$c5f598c0 AT zahav DOT net DOT il> <200412281245 DOT iBSCjQRj001350 AT envy DOT delorie DOT com> <72v3t01u5oeu89j63pfeece2ip780hsb45 AT 4ax DOT com> <01c4ed60$Blat.v2.2.2$fab621a0 AT zahav DOT net DOT il> <01c4ee2a$Blat.v2.2.2$0f6c2800 AT zahav DOT net DOT il> <01c4eea1$Blat.v2.2.2$74816940 AT zahav DOT net DOT il> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 50 Date: Fri, 31 Dec 2004 20:35:25 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw3no 1104525325 24.71.223.147 (Fri, 31 Dec 2004 13:35:25 MST) NNTP-Posting-Date: Fri, 31 Dec 2004 13:35:25 MST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 30 Dec 2004 20:56:45 +0200 in comp.os.msdos.djgpp, "Eli Zaretskii" wrote: >> From: Brian Inglis >> Date: Thu, 30 Dec 2004 11:32:27 GMT >> >> >> Saw that: looks like it just flushes buffered writes, not all buffered >> >> data read. >> > >> >On what OS? >> >> In flushdc.{c,txh} and RBIL. >> None of them say that the list of all cached blocks is cleared, > >Yes, but did you actually try that, or did you only look at the >sources? If you did try it and it didn't remove the read data, please >tell on what OS was that. > >Note that the system call used by the function not only flushes the >cache, but also resets the disk drive, which should do what you want >(and at least on plain DOS, it actually did). > >> or that caching is disabled. > >The function doesn't disable caching, but if you invoke it after every >test, you should see the behavior of uncached data, i.e. raw disk I/O >performance. Isn't that what you wanted? Good call, Eli. Calling it before each open, I do see uncached behaviour. Not what I would call *raw* disk I/O performance: 10MB/s in a VDM! But that's exactly what I wanted. Typical results (including open and close) are: __ default __ __ setvbuf __ File Size Buffer Reads Time Transfer Time Transfer Faster (MB) (B) (s) (MB/s) (s) (MB/s) PD2.DLL 17 64K 278 1.813 9.574 1.762 9.853 setvbuf PD2.DLL 17 32K 556 1.835 9.457 1.792 9.684 setvbuf PD2.DLL 17 16K 1111 1.802 9.632 1.791 9.692 setvbuf PD2.DLL 17 8K 2222 1.836 9.452 1.747 9.935 setvbuf PD2.DLL 17 4K 4444 1.809 9.597 1.811 9.585 default PD2.DLL 17 2K 8887 1.810 9.587 1.814 9.570 default PD2.DLL 17 1K 17774 1.753 9.904 1.802 9.630 default PD2.DLL 17 512 35548 1.782 9.740 1.788 9.705 default PD2.DLL 17 256 71095 1.795 9.667 1.813 9.573 default -- Thanks. Take care, Brian Inglis