On Tue, 2004-05-04 at 08:03, Ram Pai wrote: > On Mon, 2004-05-03 at 23:29, Andrew Morton wrote: > > > > > Putting a semaphore around do_generic_file_read() or maintaining the state > > as below fixes it up. > > > > I wonder if we should bother fixing this? I guess as long as the app is > > using pread() it is a legitimate thing to be doing, so I guess we should... > > > > > > > Yes this patch makes sense. I have setup sysbench on my lab machine. Let > me see how much improvement the patch provides. I ran the following command: /root/sysbench-0.2.5/sysbench/sysbench --num-threads=256 --test=fileio --file-total-size=2800M --file-test-mode=rndrw run Without the patch: ------------------ Operations performed: 5959 Read, 4041 Write, 10752 Other = 20752 Total Read 93Mb Written 63Mb Total Transferred 156Mb 7.549Mb/sec Transferred 483.89 Requests/sec executed Test execution Statistics summary: Time spent for test: 20.6661s no of times window reset because of hits: 0 no of times window reset because of misses: 7 no of times window was shrunk because of hits: 6716 no of times the page request was non-contiguous: 5880 no of times the page request was contiguous : 19639 With the patch: -------------- Operations performed: 5960 Read, 4040 Write, 10880 Other = 20880 Total Read 93Mb Written 63Mb Total Transferred 156Mb 7.985Mb/sec Transferred 511.85 Requests/sec executed Test execution Statistics summary: Time spent for test: 19.5370s no of times window got reset because of hits: 0 no of times window got reset because of misses: 0 no of times window was shrunk because of hits: 5844 no of times the page request was non-contiguous: 5830 no of times the page request was contiguous : 20232 I have enclosed the patch that collects the hit/miss related counts. In general I am not seeing any major difference with or without andrew's ra-copy patch; except for readahead window getting closed because of misses when run without the patch. Would be nice if Alexey tries the patch on his machine and sees any major difference. RP