aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/shmem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index c15b998e5a86..d4e184e2a38e 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -929,7 +929,8 @@ static struct page *shmem_swapin(swp_entry_t swap, gfp_t gfp,
929 929
930 /* Create a pseudo vma that just contains the policy */ 930 /* Create a pseudo vma that just contains the policy */
931 pvma.vm_start = 0; 931 pvma.vm_start = 0;
932 pvma.vm_pgoff = index; 932 /* Bias interleave by inode number to distribute better across nodes */
933 pvma.vm_pgoff = index + info->vfs_inode.i_ino;
933 pvma.vm_ops = NULL; 934 pvma.vm_ops = NULL;
934 pvma.vm_policy = spol; 935 pvma.vm_policy = spol;
935 return swapin_readahead(swap, gfp, &pvma, 0); 936 return swapin_readahead(swap, gfp, &pvma, 0);
@@ -942,7 +943,8 @@ static struct page *shmem_alloc_page(gfp_t gfp,
942 943
943 /* Create a pseudo vma that just contains the policy */ 944 /* Create a pseudo vma that just contains the policy */
944 pvma.vm_start = 0; 945 pvma.vm_start = 0;
945 pvma.vm_pgoff = index; 946 /* Bias interleave by inode number to distribute better across nodes */
947 pvma.vm_pgoff = index + info->vfs_inode.i_ino;
946 pvma.vm_ops = NULL; 948 pvma.vm_ops = NULL;
947 pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, index); 949 pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, index);
948 950