memory.c (9156ad48338e0306e508ead5c0d9986050744475) memory.c (95c354fe9f7d6decc08a92aa26eb233ecc2155bf)
1/*
2 * linux/mm/memory.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * demand-loading started 01.12.91 - seems it is high on the list of

--- 499 unchanged lines hidden (view full) ---

508 do {
509 /*
510 * We are holding two locks at this point - either of them
511 * could generate latencies in another task on another CPU.
512 */
513 if (progress >= 32) {
514 progress = 0;
515 if (need_resched() ||
1/*
2 * linux/mm/memory.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * demand-loading started 01.12.91 - seems it is high on the list of

--- 499 unchanged lines hidden (view full) ---

508 do {
509 /*
510 * We are holding two locks at this point - either of them
511 * could generate latencies in another task on another CPU.
512 */
513 if (progress >= 32) {
514 progress = 0;
515 if (need_resched() ||
516 need_lockbreak(src_ptl) ||
517 need_lockbreak(dst_ptl))
516 spin_needbreak(src_ptl) || spin_needbreak(dst_ptl))
518 break;
519 }
520 if (pte_none(*src_pte)) {
521 progress++;
522 continue;
523 }
524 copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, vma, addr, rss);
525 progress += 8;

--- 322 unchanged lines hidden (view full) ---

848 if (zap_work > 0) {
849 BUG_ON(start != end);
850 break;
851 }
852
853 tlb_finish_mmu(*tlbp, tlb_start, start);
854
855 if (need_resched() ||
517 break;
518 }
519 if (pte_none(*src_pte)) {
520 progress++;
521 continue;
522 }
523 copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, vma, addr, rss);
524 progress += 8;

--- 322 unchanged lines hidden (view full) ---

847 if (zap_work > 0) {
848 BUG_ON(start != end);
849 break;
850 }
851
852 tlb_finish_mmu(*tlbp, tlb_start, start);
853
854 if (need_resched() ||
856 (i_mmap_lock && need_lockbreak(i_mmap_lock))) {
855 (i_mmap_lock && spin_needbreak(i_mmap_lock))) {
857 if (i_mmap_lock) {
858 *tlbp = NULL;
859 goto out;
860 }
861 cond_resched();
862 }
863
864 *tlbp = tlb_gather_mmu(vma->vm_mm, fullmm);

--- 898 unchanged lines hidden (view full) ---

1763 /* Top of vma has been split off since last time */
1764 vma->vm_truncate_count = details->truncate_count;
1765 return 0;
1766 }
1767 }
1768
1769 restart_addr = zap_page_range(vma, start_addr,
1770 end_addr - start_addr, details);
856 if (i_mmap_lock) {
857 *tlbp = NULL;
858 goto out;
859 }
860 cond_resched();
861 }
862
863 *tlbp = tlb_gather_mmu(vma->vm_mm, fullmm);

--- 898 unchanged lines hidden (view full) ---

1762 /* Top of vma has been split off since last time */
1763 vma->vm_truncate_count = details->truncate_count;
1764 return 0;
1765 }
1766 }
1767
1768 restart_addr = zap_page_range(vma, start_addr,
1769 end_addr - start_addr, details);
1771 need_break = need_resched() ||
1772 need_lockbreak(details->i_mmap_lock);
1770 need_break = need_resched() || spin_needbreak(details->i_mmap_lock);
1773
1774 if (restart_addr >= end_addr) {
1775 /* We have now completed this vma: mark it so */
1776 vma->vm_truncate_count = details->truncate_count;
1777 if (!need_break)
1778 return 0;
1779 } else {
1780 /* Note restart_addr in vma's truncate_count field */

--- 978 unchanged lines hidden ---
1771
1772 if (restart_addr >= end_addr) {
1773 /* We have now completed this vma: mark it so */
1774 vma->vm_truncate_count = details->truncate_count;
1775 if (!need_break)
1776 return 0;
1777 } else {
1778 /* Note restart_addr in vma's truncate_count field */

--- 978 unchanged lines hidden ---