|
@@ -1231,6 +1231,16 @@ void task_numa_work(struct callback_head *work)
|
|
|
if (!vma_migratable(vma) || !vma_policy_mof(p, vma))
|
|
|
continue;
|
|
|
|
|
|
+ /*
|
|
|
+ * Shared library pages mapped by multiple processes are not
|
|
|
+ * migrated as it is expected they are cache replicated. Avoid
|
|
|
+ * hinting faults in read-only file-backed mappings or the vdso
|
|
|
+ * as migrating the pages will be of marginal benefit.
|
|
|
+ */
|
|
|
+ if (!vma->vm_mm ||
|
|
|
+ (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ)))
|
|
|
+ continue;
|
|
|
+
|
|
|
do {
|
|
|
start = max(start, vma->vm_start);
|
|
|
end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);
|