Commit dcb0bd5
committed
MDEV-22544: Inconsistent and Incorrect rw-lock stats
- There are multiple inconsistency and incorrect way in which rw-lock stats are calculated. - shared rw-lock stats: "rounds" counter is incremented only once for N rounds done in spin-cycle. - all rw-lock stats: If the spin-cycle is short-circuited then attempts are re-counted. [If spin-cycle is interrupted, before it completes srv_n_spin_wait_rounds (default 30) rounds, spin_count is incremented to consider this. If thread resumes spin-cycle (due to unavailability of the locks) and is again interrupted or completed, spin_count is again incremented with the total count, failing to adjust the previous attempt increment]. - s/x rw-lock stats: spin_loop counter is not incremented at-all instead it is projected as 0 (in show engine output) and division to calculate spin-round per spin-loop is adjusted. As per the original semantics spin_loop counter should be incremented once per spin_loop execution. - sx rw-lock stats: sx locks increments spin_loop counter but instead of incrementing it once for a spin_loop invocation it does it multiple times based on how many time spin_loop flow is repeated for same instance post os-wait.1 parent f827ba3 commit dcb0bd5
1 file changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| |||
307 | 310 | | |
308 | 311 | | |
309 | 312 | | |
310 | | - | |
| 313 | + | |
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
| |||
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
431 | | - | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
654 | 657 | | |
655 | 658 | | |
656 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
657 | 666 | | |
658 | 667 | | |
659 | 668 | | |
| |||
673 | 682 | | |
674 | 683 | | |
675 | 684 | | |
| 685 | + | |
676 | 686 | | |
677 | 687 | | |
678 | 688 | | |
| |||
681 | 691 | | |
682 | 692 | | |
683 | 693 | | |
684 | | - | |
| 694 | + | |
685 | 695 | | |
686 | 696 | | |
687 | 697 | | |
| |||
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
752 | | - | |
753 | 762 | | |
754 | 763 | | |
755 | 764 | | |
756 | 765 | | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
757 | 773 | | |
758 | 774 | | |
759 | 775 | | |
| |||
765 | 781 | | |
766 | 782 | | |
767 | 783 | | |
768 | | - | |
769 | 784 | | |
770 | 785 | | |
771 | 786 | | |
772 | 787 | | |
773 | 788 | | |
774 | 789 | | |
775 | | - | |
776 | | - | |
777 | 790 | | |
| 791 | + | |
778 | 792 | | |
779 | 793 | | |
780 | 794 | | |
781 | 795 | | |
782 | 796 | | |
783 | 797 | | |
784 | 798 | | |
785 | | - | |
| 799 | + | |
786 | 800 | | |
787 | 801 | | |
788 | 802 | | |
| |||
814 | 828 | | |
815 | 829 | | |
816 | 830 | | |
817 | | - | |
818 | 831 | | |
819 | 832 | | |
820 | 833 | | |
| |||
0 commit comments