diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-30 03:48:57 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-30 03:48:57 -0400 |
| commit | 2fcf522509cceea524b6e7ece8fd6759b682175a (patch) | |
| tree | d356e87307e451cce5497ad8daeeeb047befe489 /mm/memory.c | |
| parent | da61396d24e37258817e42537c482e962b4742f7 (diff) | |
| parent | 1fdab81e675c6ef76a49b8aabb7eaf4be51d1b80 (diff) | |
/spare/repo/libata-dev branch 'master'
Diffstat (limited to 'mm/memory.c')
| -rw-r--r-- | mm/memory.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index e046b7e4b530..a596c1172248 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -498,6 +498,17 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
| 498 | unsigned long addr = vma->vm_start; | 498 | unsigned long addr = vma->vm_start; |
| 499 | unsigned long end = vma->vm_end; | 499 | unsigned long end = vma->vm_end; |
| 500 | 500 | ||
| 501 | /* | ||
| 502 | * Don't copy ptes where a page fault will fill them correctly. | ||
| 503 | * Fork becomes much lighter when there are big shared or private | ||
| 504 | * readonly mappings. The tradeoff is that copy_page_range is more | ||
| 505 | * efficient than faulting. | ||
| 506 | */ | ||
| 507 | if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_RESERVED))) { | ||
| 508 | if (!vma->anon_vma) | ||
| 509 | return 0; | ||
| 510 | } | ||
| 511 | |||
| 501 | if (is_vm_hugetlb_page(vma)) | 512 | if (is_vm_hugetlb_page(vma)) |
| 502 | return copy_hugetlb_page_range(dst_mm, src_mm, vma); | 513 | return copy_hugetlb_page_range(dst_mm, src_mm, vma); |
| 503 | 514 | ||
