RE: [git patches] IDE update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Axboe <[email protected]> wrote:{
> >>   
> >>>Some more investigation - it appears to be broken read-ahead, actually.
> >>>
> >>>--- mm/readahead.c~	2005-07-08 11:16:14.000000000 +0200
> >>>+++ mm/readahead.c	2005-07-08 11:17:49.000000000 +0200
> >>>@@ -351,7 +351,9 @@
> >>> 		ra->cache_hit += nr_to_read;
> >>> 		if (ra->cache_hit >= VM_MAX_CACHE_HIT) {
> >>> 			ra_off(ra);
> >>>+#if 0
> >>> 			ra->flags |= RA_FLAG_INCACHE;
> >>>+#endif
> >>> 			return 0;
> >>> 		}
> >>> 	} else {
> >>
> >> >Just use the test app I posted, it shows the problem just fine. If I 
> >use a regular file, behaviour is identical as expected (ie equally 
> >broken :-).
}

Modified test app shows comparison w/ and w/o O_DIRECT.

Your comments please!

2.4.31# (hdparm -f /dev/hda;free;time /tmp/readisk /dev/hda 1 )

/dev/hda:
             total       used       free     shared    buffers     cached
Mem:        256388      23728     232660          0       1944       4324
-/+ buffers/cache:      17460     238928
Swap:            0          0          0
Mem Throughput: 107 MiB/sec - 8388608-16 bs-blks
Mem Throughput: 121 MiB/sec - 4194304-32 bs-blks
Mem Throughput: 122 MiB/sec - 2097152-64 bs-blks
Mem Throughput: 122 MiB/sec - 1048576-128 bs-blks
Mem Throughput: 120 MiB/sec - 524288-256 bs-blks
Mem Throughput: 120 MiB/sec - 262144-512 bs-blks
Mem Throughput: 131 MiB/sec - 131072-1024 bs-blks
Mem Throughput: 336 MiB/sec - 65536-2048 bs-blks
Mem Throughput: 476 MiB/sec - 32768-4096 bs-blks
Mem Throughput: 432 MiB/sec - 16384-8192 bs-blks
Mem Throughput: 824 MiB/sec - 8192-16384 bs-blks	<--- 20% faster
Mem Throughput: 799 MiB/sec - 4096-32768 bs-blks
Mem Throughput: 494 MiB/sec - 2048-65536 bs-blks
Mem Throughput: 270 MiB/sec - 1024-131072 bs-blks
Mem Throughput: 146 MiB/sec - 512-262144 bs-blks
Mem Throughput: 76 MiB/sec - 256-524288 bs-blks
Disk Throughput: 39 MiB/sec
1.13user 12.35system 0:15.65elapsed 86%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (87major+2061minor)pagefaults 0swaps
=====================================================================

2.4.31# (hdparm -f /dev/hda;free;time /tmp/readisk /dev/hda 1 1 )
O_DIRECT

/dev/hda:
             total       used       free     shared    buffers     cached
Mem:        256388      23824     232564          0       2024       4324
-/+ buffers/cache:      17476     238912
Swap:            0          0          0
Mem Throughput: 36 MiB/sec - 8388608-16 bs-blks
Mem Throughput: 34 MiB/sec - 4194304-32 bs-blks
Mem Throughput: 34 MiB/sec - 2097152-64 bs-blks
Mem Throughput: 37 MiB/sec - 1048576-128 bs-blks
Mem Throughput: 29 MiB/sec - 524288-256 bs-blks		<--- small dip
Mem Throughput: 15 MiB/sec - 262144-512 bs-blks		<--- 333% slower
Mem Throughput: 42 MiB/sec - 131072-1024 bs-blks
Mem Throughput: 45 MiB/sec - 65536-2048 bs-blks
Mem Throughput: 40 MiB/sec - 32768-4096 bs-blks
Mem Throughput: 36 MiB/sec - 16384-8192 bs-blks
Mem Throughput: 33 MiB/sec - 8192-16384 bs-blks
Mem Throughput: 25 MiB/sec - 4096-32768 bs-blks
Mem Throughput: 16 MiB/sec - 2048-65536 bs-blks
Mem Throughput: 10 MiB/sec - 1024-131072 bs-blks
read infile: Invalid argument 512-262144 bs-blks	<--- too small?
read infile: Invalid argument 256-524288 bs-blks
Disk Throughput: 38 MiB/sec
0.27user 10.88system 1:12.95elapsed 15%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (99major+2062minor)pagefaults 0swaps
=====================================================================

2.6.12# (hdparm -f /dev/hda;free;time /tmp/readisk /dev/hda 1 )

/dev/hda:
             total       used       free     shared    buffers     cached
Mem:        255228      15668     239560          0       5060       4252
-/+ buffers/cache:       6356     248872
Swap:            0          0          0
Mem Throughput: 97 MiB/sec - 8388608-16 bs-blks
Mem Throughput: 120 MiB/sec - 4194304-32 bs-blks
Mem Throughput: 120 MiB/sec - 2097152-64 bs-blks
Mem Throughput: 120 MiB/sec - 1048576-128 bs-blks
Mem Throughput: 121 MiB/sec - 524288-256 bs-blks
Mem Throughput: 120 MiB/sec - 262144-512 bs-blks
Mem Throughput: 129 MiB/sec - 131072-1024 bs-blks
Mem Throughput: 237 MiB/sec - 65536-2048 bs-blks
Mem Throughput: 451 MiB/sec - 32768-4096 bs-blks
Mem Throughput: 418 MiB/sec - 16384-8192 bs-blks
Mem Throughput: 636 MiB/sec - 8192-16384 bs-blks
Mem Throughput: 672 MiB/sec - 4096-32768 bs-blks	<--- 20% slower
Mem Throughput: 399 MiB/sec - 2048-65536 bs-blks
Mem Throughput: 217 MiB/sec - 1024-131072 bs-blks
Mem Throughput: 115 MiB/sec - 512-262144 bs-blks
Mem Throughput: 59 MiB/sec - 256-524288 bs-blks
Disk Throughput: 26 MiB/sec
0.93user 13.79system 0:18.59elapsed 79%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+2150minor)pagefaults 0swaps
=====================================================================

2.6.12# (hdparm -f /dev/hda;free;time /tmp/readisk /dev/hda 1 1)
O_DIRECT

/dev/hda:
             total       used       free     shared    buffers     cached
Mem:        255228      15668     239560          0       5060       4252
-/+ buffers/cache:       6356     248872
Swap:            0          0          0
Mem Throughput: 33 MiB/sec - 8388608-16 bs-blks
Mem Throughput: 30 MiB/sec - 4194304-32 bs-blks
Mem Throughput: 34 MiB/sec - 2097152-64 bs-blks
Mem Throughput: 39 MiB/sec - 1048576-128 bs-blks
Mem Throughput: 30 MiB/sec - 524288-256 bs-blks		<--- small dip
Mem Throughput: 49 MiB/sec - 262144-512 bs-blks		<--- 333% faster
Mem Throughput: 49 MiB/sec - 131072-1024 bs-blks
Mem Throughput: 44 MiB/sec - 65536-2048 bs-blks
Mem Throughput: 42 MiB/sec - 32768-4096 bs-blks
Mem Throughput: 40 MiB/sec - 16384-8192 bs-blks
Mem Throughput: 29 MiB/sec - 8192-16384 bs-blks
Mem Throughput: 22 MiB/sec - 4096-32768 bs-blks
Mem Throughput: 14 MiB/sec - 2048-65536 bs-blks
Mem Throughput: 8 MiB/sec - 1024-131072 bs-blks
Mem Throughput: 4 MiB/sec - 512-262144 bs-blks
read infile: Invalid argument 256-524288 bs-blks	<--- too small?
Disk Throughput: 34 MiB/sec
0.69user 32.09system 1:39.15elapsed 33%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+2164minor)pagefaults 0swaps
=====================================================================

Attachment: rd128.c
Description: Binary data


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux