diff options
| -rw-r--r-- | mm/huge_memory.c | 7 | ||||
| -rw-r--r-- | mm/memory.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index fc00c8cb5a82..89b9075f8c11 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
| @@ -1295,8 +1295,13 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 1295 | * Avoid grouping on DSO/COW pages in specific and RO pages | 1295 | * Avoid grouping on DSO/COW pages in specific and RO pages |
| 1296 | * in general, RO pages shouldn't hurt as much anyway since | 1296 | * in general, RO pages shouldn't hurt as much anyway since |
| 1297 | * they can be in shared cache state. | 1297 | * they can be in shared cache state. |
| 1298 | * | ||
| 1299 | * FIXME! This checks "pmd_dirty()" as an approximation of | ||
| 1300 | * "is this a read-only page", since checking "pmd_write()" | ||
| 1301 | * is even more broken. We haven't actually turned this into | ||
| 1302 | * a writable page, so pmd_write() will always be false. | ||
| 1298 | */ | 1303 | */ |
| 1299 | if (!pmd_write(pmd)) | 1304 | if (!pmd_dirty(pmd)) |
| 1300 | flags |= TNF_NO_GROUP; | 1305 | flags |= TNF_NO_GROUP; |
| 1301 | 1306 | ||
| 1302 | /* | 1307 | /* |
diff --git a/mm/memory.c b/mm/memory.c index 8068893697bb..411144f977b1 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -3072,8 +3072,13 @@ static int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 3072 | * Avoid grouping on DSO/COW pages in specific and RO pages | 3072 | * Avoid grouping on DSO/COW pages in specific and RO pages |
| 3073 | * in general, RO pages shouldn't hurt as much anyway since | 3073 | * in general, RO pages shouldn't hurt as much anyway since |
| 3074 | * they can be in shared cache state. | 3074 | * they can be in shared cache state. |
| 3075 | * | ||
| 3076 | * FIXME! This checks "pmd_dirty()" as an approximation of | ||
| 3077 | * "is this a read-only page", since checking "pmd_write()" | ||
| 3078 | * is even more broken. We haven't actually turned this into | ||
| 3079 | * a writable page, so pmd_write() will always be false. | ||
| 3075 | */ | 3080 | */ |
| 3076 | if (!pte_write(pte)) | 3081 | if (!pte_dirty(pte)) |
| 3077 | flags |= TNF_NO_GROUP; | 3082 | flags |= TNF_NO_GROUP; |
| 3078 | 3083 | ||
| 3079 | /* | 3084 | /* |
