Commit b01db23
sched/eevdf: Fix pick_eevdf()
The old pick_eevdf() could fail to find the actual earliest eligible
deadline when it descended to the right looking for min_deadline, but
it turned out that that min_deadline wasn't actually eligible. In that
case we need to go back and search through any left branches we
skipped looking for the actual best _eligible_ min_deadline.
This is more expensive, but still O(log n), and at worst should only
involve descending two branches of the rbtree.
I've run this through a userspace stress test (thank you
tools/lib/rbtree.c), so hopefully this implementation doesn't miss any
corner cases.
Fixes: 147f3ef ("sched/fair: Implement an EEVDF-like scheduling policy")
Signed-off-by: Ben Segall <bsegall@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/xm261qego72d.fsf_-_@google.com1 parent 8dafa9d commit b01db23
1 file changed
Lines changed: 58 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
| 875 | + | |
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| 884 | + | |
883 | 885 | | |
884 | 886 | | |
885 | 887 | | |
| |||
900 | 902 | | |
901 | 903 | | |
902 | 904 | | |
903 | | - | |
904 | | - | |
905 | | - | |
| 905 | + | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | 909 | | |
913 | 910 | | |
914 | | - | |
915 | | - | |
| 911 | + | |
| 912 | + | |
916 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
917 | 957 | | |
918 | 958 | | |
919 | 959 | | |
920 | 960 | | |
921 | 961 | | |
922 | 962 | | |
| 963 | + | |
923 | 964 | | |
924 | 965 | | |
| 966 | + | |
| 967 | + | |
925 | 968 | | |
926 | | - | |
927 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
928 | 972 | | |
929 | | - | |
| 973 | + | |
930 | 974 | | |
931 | 975 | | |
932 | 976 | | |
933 | 977 | | |
934 | 978 | | |
935 | 979 | | |
936 | 980 | | |
937 | | - | |
| 981 | + | |
938 | 982 | | |
939 | 983 | | |
940 | 984 | | |
| |||
0 commit comments