Commit 4730314
committed
MDEV-28369 ibuf_bitmap_mutex is an unnecessary contention point
The only purpose of ibuf_bitmap_mutex is to prevent a deadlock between two concurrent invocations of ibuf_update_free_bits_for_two_pages_low() on the same pair of bitmap pages, but in opposite order. The mutex is unnecessarily serializing the execution of the function even when it is being invoked on totally different tablespaces. To avoid deadlocks, it suffices to ensure that the two page latches are being acquired in a deterministic (sorted) order.1 parent 372b0e6 commit 4730314
File tree
6 files changed
+14
-50
lines changed- storage/innobase
- handler
- ibuf
- include
- sync
6 files changed
+14
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | 632 | | |
634 | 633 | | |
635 | 634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | 256 | | |
260 | 257 | | |
261 | 258 | | |
| |||
402 | 399 | | |
403 | 400 | | |
404 | 401 | | |
405 | | - | |
406 | | - | |
407 | 402 | | |
408 | 403 | | |
409 | 404 | | |
| |||
459 | 454 | | |
460 | 455 | | |
461 | 456 | | |
462 | | - | |
463 | | - | |
464 | 457 | | |
465 | 458 | | |
466 | 459 | | |
| |||
1035 | 1028 | | |
1036 | 1029 | | |
1037 | 1030 | | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
| 1031 | + | |
| 1032 | + | |
1054 | 1033 | | |
1055 | | - | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1056 | 1038 | | |
1057 | | - | |
| 1039 | + | |
| 1040 | + | |
1058 | 1041 | | |
1059 | 1042 | | |
1060 | 1043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
295 | 294 | | |
296 | 295 | | |
297 | 296 | | |
298 | | - | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | 476 | | |
478 | 477 | | |
479 | 478 | | |
| |||
749 | 748 | | |
750 | 749 | | |
751 | 750 | | |
752 | | - | |
753 | 751 | | |
754 | 752 | | |
755 | 753 | | |
| |||
834 | 832 | | |
835 | 833 | | |
836 | 834 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
| 835 | + | |
847 | 836 | | |
848 | 837 | | |
849 | 838 | | |
850 | 839 | | |
851 | 840 | | |
852 | | - | |
| 841 | + | |
853 | 842 | | |
854 | 843 | | |
855 | 844 | | |
| |||
1291 | 1280 | | |
1292 | 1281 | | |
1293 | 1282 | | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | 1283 | | |
1298 | 1284 | | |
1299 | 1285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
0 commit comments