aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/fair.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index de9b4d8eb853..fbc0c84a8a04 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1231,6 +1231,16 @@ void task_numa_work(struct callback_head *work)
1231 if (!vma_migratable(vma) || !vma_policy_mof(p, vma)) 1231 if (!vma_migratable(vma) || !vma_policy_mof(p, vma))
1232 continue; 1232 continue;
1233 1233
1234 /*
1235 * Shared library pages mapped by multiple processes are not
1236 * migrated as it is expected they are cache replicated. Avoid
1237 * hinting faults in read-only file-backed mappings or the vdso
1238 * as migrating the pages will be of marginal benefit.
1239 */
1240 if (!vma->vm_mm ||
1241 (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ)))
1242 continue;
1243
1234 do { 1244 do {
1235 start = max(start, vma->vm_start); 1245 start = max(start, vma->vm_start);
1236 end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE); 1246 end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);