Re: [PATCH] Recent VM fiasco - fixed

Simon Kirby
2000-05-11T14:17:04Z

[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]

On Thu, May 11, 2000 at 12:23:19AM -0700, Linus Torvalds wrote:

> Hmm..
>
> Having tested some more, the "wait for locked buffer" logic in
> fs/buffer.c (sync_page_buffers()) seems toserialize thingsawhole lote more
> than I initially thought..
>
> Does it act the way you expect if you change the
>
> if (buffer_locked(p))
> __wait_on_buffer(p);
> else if (buffer_dirty(p))
> ll_rw_block(..
>
> to a simpler
>
> if (buffer_dirty(p) && !buffer_locked(p))
> ll_rw_block(..
>
> which doesn't endup serializing the IO all the time?

A little bit better! 203 vmstat-line-seconds before, now 155
vmstat-line-seconds to complete. It seems to be doing a better job like
this, but still doesn't write out in blocks like it used to:

2.3.99pre7-9 vanilla:

0 1 1 32 2212 216 112424 0 4 609 527 239 112 5 8 87
0 1 1 32 3004 216 111472 0 4 608 540 327 120 5 7 87
0 1 1 32 3008 232 111252 0 4 768 1083 405 252 3 11 86
0 1 1 32 1964 240 112144 0 0 594 570 422 222 3 14 83
1 1 1 60 2932 248 111164 0 36 661 586 349 226 3 13 84

2.3.99pre7-9 with above adjustment:

0 1 1 64 3032 272 110768 0 0 833 628 414 338 5 28 67
0 1 1 64 2608 276 111040 0 0 769 1081 440 268 3 24 72
0 1 1 64 2684 284 110804 0 0 847 1089 370 280 6 12 82
0 1 0 64 2832 276 110796 0 0 706 558 384 193 7 11 82
0 1 1 136 1280 284 112440 0 72 911 1084 494 251 6 13 81

Also, it's still not as fast as classzone-27 writing out, and CPU use is
still a bit higher:

2.3.99pre7-8 classzone-27:

0 1 0 540 2852 272 110796 0 0 1089 1000 465 148 7 5 88
0 1 0 540 2980 264 110676 0 0 1423 1500 380 140 7 7 86
0 1 0 540 2584 272 111068 0 0 1059 1000 421 146 9 3 88
0 1 0 988 2556 276 111524 0 448 1473 1612 523 148 10 6 84
1 0 0 988 2704 264 111408 0 0 1135 1000 423 163 6 6 88

(All from random areas, sorry... it might be a good idea to read all of
the output in the attachment.)

I attached vmstat-3.txt, the full output with "2.3.99pre7-9 with above
adjustment".

Simon-

[ Stormix Technologies Inc. ][ NetNation Communications Inc. ]
[ sim@stormix.com ][ sim@netnation.com ]
[ Opinions expressed are not necessarily those of my employers. ]

[-- Attachment #2: vmstat-3.txt --]
[-- Type: text/plain, Size: 18880 bytes --]

procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 0 106000 1144 10132 0 0 46 2 68 38 3 2 96
0 0 0 0 106000 1144 10132 0 0 0 0 102 6 0 0 100
0 0 0 0 106000 1144 10132 0 0 0 0 102 8 0 0 100
0 0 0 0 105996 1148 10132 0 0 1 6 107 10 0 0 100
0 0 0 0 105996 1148 10132 0 0 0 0 102 12 0 0 100
0 0 0 0 105996 1148 10132 0 0 0 0 102 8 0 0 100
0 0 0 0 105996 1148 10132 0 0 0 0 122 8 0 0 100
0 0 0 0 105996 1148 10132 0 0 0 0 121 6 0 0 100
1 0 0 0 81272 1204 32784 0 0 3002 5 309 245 16 11 72
0 1 0 0 56364 1236 56840 0 0 3027 500 369 327 16 12 72
0 1 0 0 44196 1248 68616 0 0 1473 1500 581 196 8 7 85
0 1 0 0 33288 1264 79224 0 0 1329 1000 584 159 7 7 86
0 1 0 0 22708 1272 89408 0 0 1281 1500 551 144 8 5 87
0 1 0 0 14784 872 97684 0 0 1424 1500 566 173 10 12 78
1 0 1 0 13980 244 99444 0 0 770 525 349 109 3 14 83
0 1 0 0 12380 204 102208 0 0 800 1021 342 105 4 19 76
1 0 0 0 11624 200 103216 0 0 801 533 292 111 6 19 74
0 1 1 0 11276 192 103856 0 0 705 1027 318 93 3 19 77
0 1 1 4 10164 200 104812 0 4 816 534 414 122 5 17 78
0 1 1 4 9040 200 106044 0 0 706 1024 390 98 2 19 78
0 1 1 40 8080 208 107056 0 36 796 539 431 112 5 21 74
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 0 40 6936 200 108144 0 0 709 1024 366 92 5 25 69
0 1 1 40 6328 204 108556 0 0 737 533 339 105 3 18 79
0 1 0 40 5184 204 109588 0 0 719 1027 327 115 4 19 77
1 0 1 76 4448 208 110376 0 36 642 533 393 96 5 14 80
0 1 1 76 3300 204 111444 0 0 832 1030 303 117 8 20 72
0 1 1 256 3056 208 111760 0 180 513 578 340 74 3 36 60
0 1 0 292 2816 200 112200 0 36 448 42 325 57 2 40 58
0 1 1 328 2984 200 112184 0 36 545 1039 271 84 3 30 67
1 1 1 400 3028 204 112084 0 72 463 58 330 62 2 36 62
0 1 1 400 3012 208 111988 0 0 544 1031 360 79 5 29 66
0 1 1 400 2952 216 111896 0 0 546 527 330 74 4 30 65
0 1 0 400 2988 220 111720 0 0 636 524 461 81 3 28 69
0 1 0 400 2960 224 111704 0 0 741 530 269 105 3 22 75
0 1 0 400 2064 216 112660 0 0 705 1024 352 89 5 23 72
0 1 1 400 2664 224 111872 0 0 783 530 279 116 5 21 73
0 1 0 400 2824 236 111612 0 0 674 1021 429 99 4 22 74
1 0 1 400 3080 232 111172 0 0 736 524 387 136 4 19 77
0 1 0 400 2560 220 112020 0 0 737 1032 304 97 4 17 79
0 1 0 400 2276 228 112212 0 0 769 545 414 81 7 15 77
0 1 0 436 2616 216 112164 0 36 751 1069 325 155 5 20 75
0 1 0 432 2812 224 111748 0 0 866 554 445 88 5 20 75
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 1 468 2692 232 111632 0 36 705 1057 377 83 4 15 80
1 0 0 464 2396 240 111796 0 0 833 1068 342 107 8 12 80
0 1 0 464 2308 252 111644 0 0 1040 1053 420 122 7 17 76
0 1 0 460 2364 256 111524 0 0 1026 1059 411 124 4 18 77
0 1 0 460 2572 260 111212 0 0 961 1068 448 108 7 19 74
0 1 0 460 2812 252 110972 0 0 993 1068 427 114 7 20 73
0 1 0 460 2820 248 111104 0 0 1007 1078 426 108 5 20 74
1 0 1 460 3068 256 110896 0 0 817 555 487 97 7 14 79
1 0 0 460 2512 248 111568 0 0 929 1063 538 105 7 16 77
0 1 0 460 2572 232 111720 0 0 929 1059 574 99 6 21 73
0 1 1 492 2972 240 111244 0 36 1040 1071 421 115 6 16 78
0 1 1 492 3012 248 111112 0 0 1058 1062 462 122 3 17 79
0 1 0 492 3048 248 111028 0 0 929 1058 415 112 7 13 79
1 0 0 492 2124 260 111788 0 0 1040 1060 480 114 7 16 77
0 1 1 528 2296 252 111772 0 36 924 1071 439 141 5 15 80
0 1 0 564 2828 232 111648 0 36 966 1081 467 139 7 19 74
0 1 0 564 3064 236 111492 0 0 897 569 347 98 8 13 78
1 0 1 564 3072 236 111508 0 0 705 1045 398 79 3 14 82
0 1 0 564 2332 240 112200 0 0 879 1057 371 121 5 14 81
1 0 1 564 3068 240 111320 0 0 898 555 369 94 5 17 77
0 1 0 600 2196 244 112376 0 36 705 1052 375 104 3 18 79
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 0 636 2900 232 111728 0 36 865 1071 329 104 6 21 73
0 1 1 636 3068 244 111496 0 0 653 540 331 85 3 19 78
1 0 1 636 3056 244 111316 0 0 736 557 389 101 7 19 74
0 1 0 636 2224 236 112216 0 0 770 1045 431 79 5 15 80
0 1 0 672 2884 256 111760 24 36 763 554 327 118 7 16 77
0 1 0 672 2824 252 111672 0 0 769 1048 416 114 4 18 78
0 1 0 672 2832 260 111568 0 0 943 1077 329 104 7 20 73
1 0 0 672 3000 268 111284 0 0 674 546 430 71 5 13 82
0 1 0 672 2844 264 111616 0 0 865 1048 447 85 8 14 78
0 1 0 708 2896 260 111372 0 36 928 1082 348 112 3 19 78
0 1 1 708 3068 252 111752 0 0 720 547 528 85 4 17 78
0 1 0 708 2536 252 112056 0 0 896 1043 376 97 7 12 81
0 1 0 744 2880 264 111772 0 36 834 571 427 88 4 21 74
1 0 0 740 2540 268 112096 0 0 769 1041 420 81 5 18 77
0 1 0 772 2548 256 112152 0 36 865 1059 335 94 4 21 75
0 1 1 772 2964 252 111764 0 0 816 559 381 101 4 15 81
0 1 0 772 2764 248 112056 16 0 757 1040 443 95 4 13 82
0 1 0 768 2292 252 112348 0 0 929 1059 378 90 4 19 77
0 1 0 768 3072 252 111336 0 0 994 1060 442 104 7 23 70
0 1 0 768 2440 252 111944 0 0 1039 1059 417 114 5 18 76
0 1 0 768 2556 240 112224 0 0 1026 1068 464 109 6 22 72
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 1 768 3068 252 111584 0 0 990 1058 392 124 4 18 78
0 1 0 768 2696 256 111708 0 0 993 1059 427 123 8 19 73
0 1 1 768 3068 252 111604 0 0 975 1062 429 105 6 18 75
0 1 0 768 2544 252 111916 0 0 994 1063 498 101 6 17 77
0 1 0 768 3064 240 111648 0 0 1025 1065 452 104 7 19 74
0 1 0 840 2368 252 112160 0 72 976 1068 387 110 5 16 79
0 1 0 840 2876 264 111424 0 0 994 1056 395 104 6 14 79
0 1 0 836 2864 264 111464 0 0 1025 1056 473 98 7 15 78
1 0 1 836 3080 240 111340 0 0 993 1053 512 108 6 16 77
0 1 0 872 2804 240 112080 0 36 975 569 376 102 4 17 78
1 0 1 872 3056 240 111868 0 0 738 1047 505 89 4 18 77
0 1 0 872 2364 240 112448 0 0 865 1057 413 105 7 15 78
0 1 1 872 3068 240 111676 0 0 928 570 350 87 5 18 76
0 1 0 872 2712 236 112148 0 0 610 1042 349 82 4 13 83
0 1 0 872 2600 240 112236 0 0 942 1077 349 122 6 15 79
0 1 0 872 2888 244 112016 0 0 706 543 330 84 4 13 83
0 1 0 872 2736 248 111988 0 0 865 1048 390 114 6 13 81
0 1 0 872 2280 244 112448 0 0 929 1046 348 96 6 17 77
1 0 0 868 2688 244 111968 0 0 847 557 422 95 7 17 76
0 1 1 868 2536 256 111856 0 0 770 1048 411 99 5 14 81
0 1 0 868 2308 240 112716 0 0 895 1067 446 99 6 20 74
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
1 0 0 904 2812 248 112092 0 36 993 1067 485 125 5 18 77
0 1 0 940 2892 248 111932 0 36 879 561 463 96 3 15 81
1 0 1 940 2464 260 111992 0 0 1058 1060 429 104 6 15 79
0 1 0 940 2552 248 112304 0 0 1057 1077 509 107 5 21 73
0 1 0 976 2816 248 111972 12 36 1011 1061 424 103 7 16 77
1 0 0 976 2140 256 112300 0 0 975 1050 411 116 8 13 79
0 1 1 976 3068 256 111724 0 0 834 1066 375 94 2 17 81
0 1 1 976 3068 236 112080 0 0 929 1048 402 96 4 23 73
0 1 1 976 2960 244 111940 0 0 961 1054 394 131 5 17 78
0 1 0 1012 2828 240 112108 0 36 975 1068 490 136 8 22 70
0 1 0 1048 2828 240 112092 0 36 994 1081 438 156 5 19 76
1 0 0 1048 2992 248 111792 0 0 993 1053 414 121 6 16 77
0 1 0 1048 2824 252 111708 0 0 944 1057 382 111 7 15 78
0 1 0 1048 2896 256 111824 0 0 860 545 367 100 6 16 78
0 1 1 1048 3068 236 112060 0 0 838 1050 474 124 5 15 79
1 0 0 1048 3088 248 111864 0 0 898 1050 415 119 6 19 75
0 1 0 1084 2204 256 112596 0 36 919 1061 392 115 5 14 81
1 0 0 1084 2292 264 112316 0 0 1083 1060 445 113 10 14 76
1 0 1 1120 2420 252 112472 0 36 1025 1078 511 101 5 18 77
0 1 0 1192 2684 248 112392 0 72 993 1085 479 102 5 18 77
0 1 0 1192 3060 248 112040 0 0 1007 1060 398 118 5 15 79
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 0 1228 2548 276 112316 88 36 940 1048 388 124 6 14 80
0 1 0 1228 2380 284 112220 0 0 1057 1056 525 124 10 14 76
0 1 1 1228 3044 284 111460 0 0 993 1035 530 96 5 16 79
0 1 0 1228 2576 260 111900 0 0 1007 1051 394 112 4 17 79
0 1 0 1228 2348 256 113036 0 0 1026 1061 456 104 4 23 73
0 1 0 1300 2276 264 112916 0 72 993 1066 441 108 6 13 81
0 1 0 1296 2324 276 112612 0 0 919 1060 469 114 7 14 79
0 1 1 1296 2336 276 112356 0 0 761 542 429 187 4 13 83
0 1 0 1296 2292 280 112656 0 0 866 1055 328 99 3 18 79
0 1 0 1296 2820 268 112140 0 0 865 1080 462 101 6 18 76
1 0 1 1296 3068 272 111868 0 0 673 539 441 112 2 15 82
0 1 1 1284 2612 268 112516 52 0 924 1065 424 109 4 20 76
0 1 1 1284 2708 280 112244 4 0 754 542 334 86 3 19 78
0 1 0 1280 2168 276 112712 0 0 832 1050 403 101 6 14 80
0 1 0 1280 2388 248 112688 0 0 897 1062 368 94 6 18 76
0 1 0 1280 2264 244 113180 0 0 705 539 428 86 5 15 80
0 1 0 1280 3032 248 112184 0 0 879 1049 337 101 6 18 76
0 1 0 1280 2764 268 112288 0 0 870 540 306 94 4 15 80
0 1 1 1288 3072 268 112028 0 8 1022 1062 398 99 6 23 71
0 1 1 1324 3072 272 111852 0 36 801 1039 520 85 5 9 85
0 1 0 1324 2868 280 111876 0 0 1135 1068 460 132 7 16 77
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 1 0 1360 2804 264 112356 0 36 962 1061 489 110 4 18 78
0 1 1 1360 3032 260 112172 0 0 1057 1070 565 109 6 20 74
0 1 0 1360 2356 268 112708 0 0 702 1036 408 85 5 12 83
0 1 0 1396 2556 276 112428 0 36 1010 1057 444 106 4 17 78
0 1 1 1396 2852 272 112056 0 0 994 1056 420 105 6 15 79
0 1 0 1396 2300 272 112580 0 0 1025 1063 447 129 7 15 78
0 1 0 1396 2808 260 112632 0 0 977 1058 427 118 5 22 73
0 1 0 1396 2740 264 112612 0 0 994 1042 486 103 5 18 77
0 1 0 1396 2800 268 112388 0 0 993 1049 410 108 5 15 80
0 1 0 1396 2352 272 112712 0 0 993 1059 487 133 7 14 79
0 1 0 1396 3068 276 111908 0 0 975 1062 409 123 7 15 78
0 1 0 1396 2544 284 112260 0 0 642 534 455 66 5 8 87
0 1 0 1396 2176 280 112916 0 0 898 1045 353 110 6 17 77
0 1 0 1396 2760 276 112160 0 0 993 1059 475 114 6 20 74
0 1 0 1396 2888 276 112032 0 0 975 1037 399 112 5 14 80
0 0 0 1264 2976 292 112956 100 0 415 2 239 93 0 3 97
0 0 0 1264 2976 292 112956 0 0 0 0 101 10 0 0 100
0 0 0 1264 2916 292 113012 0 0 29 0 105 10 0 0 100
0 0 0 1264 2916 292 113012 0 0 0 0 101 8 0 0 100
0 0 0 1264 2916 292 113012 0 0 0 0 102 6 0 0 100
0 0 0 1264 2916 292 113012 0 0 0 0 101 14 0 0 100
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 1264 2860 296 113056 16 0 19 0 107 16 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 105 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 103 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 103 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 12 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 10 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 6 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 103 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 6 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 14 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 8 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 12 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 101 10 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 6 0 0 100
0 0 0 1264 2860 296 113056 0 0 0 0 102 8 0 0 100
0 0 0 1264 2732 312 113160 80 0 40 0 120 36 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 1174 177 14 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 1 1264 2728 312 113164 0 0 0 2601 101 10 0 0 99
0 0 0 1264 2728 312 113164 0 0 0 1673 356 240 0 1 99
0 0 0 1264 2728 312 113164 0 0 0 0 132 10 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 4 104 14 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 12 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 12 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 10 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 6 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 14 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 102 8 0 0 100
0 0 0 1264 2728 312 113164 0 0 0 0 101 8 0 0 100
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 1264 2724 312 113168 4 0 1 0 110 16 0 0 99
0 0 0 1264 2552 332 113308 0 0 78 4 123 47 0 1 99
0 0 0 1264 2552 332 113308 0 0 0 0 102 8 0 0 100
0 0 0 1264 2552 332 113308 0 0 0 0 108 10 0 0 100