Commit ca3d643
xfs: cache open zone in inode->i_private
The MRU cache for open zones is unfortunately still not ideal, as it can
time out pretty easily when doing heavy I/O to hard disks using up most
or all open zones. One option would be to just increase the timeout,
but while looking into that I realized we're just better off caching it
indefinitely as there is no real downside to that once we don't hold a
reference to the cache open zone.
So switch the open zone to RCU freeing, and then stash the last used
open zone into inode->i_private. This helps to significantly reduce
fragmentation by keeping I/O localized to zones for workloads that
write using many open files to HDD.
Fixes: 4e4d520 ("xfs: add the zoned space allocator")
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hans Holmberg <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Tested-by: Damien Le Moal <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>1 parent a8c861f commit ca3d643
File tree
4 files changed
+53
-85
lines changed- fs/xfs
4 files changed
+53
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
789 | 795 | | |
790 | 796 | | |
791 | 797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
756 | 764 | | |
757 | 765 | | |
758 | 766 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | 767 | | |
786 | 768 | | |
787 | 769 | | |
788 | 770 | | |
789 | 771 | | |
790 | | - | |
791 | | - | |
792 | | - | |
| 772 | + | |
| 773 | + | |
793 | 774 | | |
794 | | - | |
795 | | - | |
| 775 | + | |
796 | 776 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
| 777 | + | |
| 778 | + | |
801 | 779 | | |
802 | 780 | | |
803 | 781 | | |
804 | 782 | | |
805 | 783 | | |
806 | 784 | | |
807 | | - | |
808 | | - | |
| 785 | + | |
| 786 | + | |
809 | 787 | | |
810 | | - | |
| 788 | + | |
| 789 | + | |
811 | 790 | | |
812 | 791 | | |
813 | 792 | | |
814 | 793 | | |
815 | | - | |
| 794 | + | |
816 | 795 | | |
817 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
818 | 804 | | |
819 | 805 | | |
820 | | - | |
821 | | - | |
822 | | - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
823 | 809 | | |
824 | | - | |
825 | | - | |
826 | | - | |
| 810 | + | |
827 | 811 | | |
828 | | - | |
829 | 812 | | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
851 | 816 | | |
852 | 817 | | |
853 | 818 | | |
| |||
891 | 856 | | |
892 | 857 | | |
893 | 858 | | |
894 | | - | |
| 859 | + | |
895 | 860 | | |
896 | 861 | | |
897 | 862 | | |
898 | 863 | | |
899 | 864 | | |
900 | 865 | | |
901 | | - | |
902 | | - | |
| 866 | + | |
903 | 867 | | |
904 | 868 | | |
905 | 869 | | |
| |||
977 | 941 | | |
978 | 942 | | |
979 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
980 | 950 | | |
981 | 951 | | |
982 | 952 | | |
| |||
1290 | 1260 | | |
1291 | 1261 | | |
1292 | 1262 | | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | 1263 | | |
1302 | 1264 | | |
1303 | 1265 | | |
| |||
1311 | 1273 | | |
1312 | 1274 | | |
1313 | 1275 | | |
1314 | | - | |
1315 | 1276 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments