Commit 6211165
vdpa/mlx5: Postpone MR deletion
Currently, when a new MR is set up, the old MR is deleted. MR deletion
is about 30-40% the time of MR creation. As deleting the old MR is not
important for the process of setting up the new MR, this operation
can be postponed.
This series adds a workqueue that does MR garbage collection at a later
point. If the MR lock is taken, the handler will back off and
reschedule. The exception during shutdown: then the handler must
not postpone the work.
Note that this is only a speculative optimization: if there is some
mapping operation that is triggered while the garbage collector handler
has the lock taken, this operation it will have to wait for the handler
to finish.
Signed-off-by: Dragos Tatulea <[email protected]>
Reviewed-by: Cosmin Ratiu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>1 parent f30a123 commit 6211165
3 files changed
+64
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
| 99 | + | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
656 | 687 | | |
657 | 688 | | |
658 | 689 | | |
| 690 | + | |
| 691 | + | |
659 | 692 | | |
660 | 693 | | |
661 | 694 | | |
662 | | - | |
663 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
664 | 700 | | |
665 | 701 | | |
666 | 702 | | |
| |||
851 | 887 | | |
852 | 888 | | |
853 | 889 | | |
854 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
855 | 896 | | |
856 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
857 | 901 | | |
858 | 902 | | |
859 | 903 | | |
860 | 904 | | |
861 | 905 | | |
862 | 906 | | |
863 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
864 | 913 | | |
865 | 914 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3435 | 3435 | | |
3436 | 3436 | | |
3437 | 3437 | | |
| 3438 | + | |
| 3439 | + | |
3438 | 3440 | | |
3439 | 3441 | | |
3440 | 3442 | | |
| |||
4042 | 4044 | | |
4043 | 4045 | | |
4044 | 4046 | | |
4045 | | - | |
4046 | | - | |
4047 | 4047 | | |
4048 | 4048 | | |
4049 | 4049 | | |
| |||
0 commit comments