diff options
-rw-r--r-- | kernel/sched/fair.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 302dda81e192..94aea5b91a96 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -5911,6 +5911,18 @@ skip_spare: | |||
5911 | if (!idlest) | 5911 | if (!idlest) |
5912 | return NULL; | 5912 | return NULL; |
5913 | 5913 | ||
5914 | /* | ||
5915 | * When comparing groups across NUMA domains, it's possible for the | ||
5916 | * local domain to be very lightly loaded relative to the remote | ||
5917 | * domains but "imbalance" skews the comparison making remote CPUs | ||
5918 | * look much more favourable. When considering cross-domain, add | ||
5919 | * imbalance to the runnable load on the remote node and consider | ||
5920 | * staying local. | ||
5921 | */ | ||
5922 | if ((sd->flags & SD_NUMA) && | ||
5923 | min_runnable_load + imbalance >= this_runnable_load) | ||
5924 | return NULL; | ||
5925 | |||
5914 | if (min_runnable_load > (this_runnable_load + imbalance)) | 5926 | if (min_runnable_load > (this_runnable_load + imbalance)) |
5915 | return NULL; | 5927 | return NULL; |
5916 | 5928 | ||