📄 00000031.htm
字号:
} <BR> mm->map_count--; <BR> remove_shared_vm_struct(mpnt); <BR>- flush_cache_range(mm, start, end); <BR>- zap_page_range(mm, start, size); <BR>+ zap_page_range(mm, start, size, ZPR_COND_RESCHED|ZPR_FLUSH_CACHE); <BR> /* sys_exit() */ <BR> if (mpnt->vm_file) <BR> fput(mpnt->vm_file); <BR> kmem_cache_free(vm_area_cachep, mpnt); <BR>--- linux-2.4.0-test8/mm/mremap.c Sat Jun 24 15:39:47 2000 <BR>+++ linux-akpm/mm/mremap.c Tue Sep 12 19:36:55 2000 <BR>@@ -118,8 +118,7 @@ <BR> flush_cache_range(mm, new_addr, new_addr + len); <BR> while ((offset += PAGE_SIZE) < len) <BR> move_one_page(mm, new_addr + offset, old_addr + offset); <BR>- zap_page_range(mm, new_addr, len); <BR>- flush_tlb_range(mm, new_addr, new_addr + len); <BR>+ zap_page_range(mm, new_addr, len, ZPR_FLUSH_TLB); <BR> return -1; <BR> } <BR> <BR>--- linux-2.4.0-test8/mm/vmscan.c Sat Sep 9 16:19:30 2000 <BR>+++ linux-akpm/mm/vmscan.c Tue Sep 12 19:36:55 2000 <BR>@@ -293,6 +293,8 @@ <BR> return result; <BR> if (!mm->swap_cnt) <BR> return 0; <BR>+ if (conditional_schedule_needed()) <BR>+ return 0; <BR> address = (address + PGDIR_SIZE) & PGDIR_MASK; <BR> pgdir++; <BR> } while (address && (address < end)); <BR>@@ -313,6 +315,7 @@ <BR> * Find the proper vm-area after freezing the vma chain <BR> * and ptes. <BR> */ <BR>+continue_scan: <BR> vmlist_access_lock(mm); <BR> vma = find_vma(mm, address); <BR> if (vma) { <BR>@@ -323,6 +326,14 @@ <BR> int result = swap_out_vma(mm, vma, address, gfp_mask); <BR> if (result) <BR> return result; <BR>+ if (!mm->swap_cnt) <BR>+ break; <BR>+ if (conditional_schedule_needed()) { <BR> <BR>+ vmlist_access_unlock(mm); <BR>+ schedule(); <BR>+ address = mm->swap_address; <BR>+ goto continue_scan; <BR>+ } <BR> vma = vma->vm_next; <BR> if (!vma) <BR> break; <BR>@@ -529,6 +540,7 @@ <BR> goto done; <BR> <BR> while (shm_swap(priority, gfp_mask)) { <BR>+ conditional_schedule(); /* required if there's much sysv shm */ <BR> if (!--count) <BR> goto done; <BR> } <BR>--- linux-2.4.0-test8/ipc/shm.c Sat Sep 9 16:19:30 2000 <BR>+++ linux-akpm/ipc/shm.c Tue Sep 12 19:36:55 2000 <BR>@@ -619,6 +619,7 @@ <BR> for (i = 0, rss = 0, swp = 0; i < pages ; i++) { <BR> pte_t pte; <BR> pte = dir[i/PTES_PER_PAGE][i%PTES_PER_PAGE]; <BR>+ conditional_schedule(); /* releasing large shm segs */ <BR> if (pte_none(pte)) <BR> continue; <BR> if (pte_present(pte)) { <BR>--- linux-2.4.0-test8/drivers/char/mem.c Sat Jun 24 15:39:43 2000 <BR>+++ linux-akpm/drivers/char/mem.c Tue Sep 12 19:36:55 2000 <BR>@@ -373,8 +373,7 @@ <BR> if (count > size) <BR> count = size; <BR> <BR>- flush_cache_range(mm, addr, addr + count); <BR>- zap_page_range(mm, addr, count); <BR>+ zap_page_range(mm, addr, count, ZPR_FLUSH_CACHE); <BR> zeromap_page_range(addr, count, PAGE_COPY); <BR> flush_tlb_range(mm, addr, addr + count); <BR> <BR>--- linux-2.4.0-test8/fs/ext2/namei.c Sat Sep 9 16:19:30 2000 <BR>+++ linux-akpm/fs/ext2/namei.c Tue Sep 12 19:36:58 2000 <BR>@@ -90,6 +90,8 @@ <BR> struct ext2_dir_entry_2 * de; <BR> char * dlimit; <BR> <BR>+ conditional_schedule(); /* Searching large directories */ <BR>+ <BR> if ((block % NAMEI_RA_BLOCKS) == 0 && toread) { <BR> ll_rw_block (READ, toread, bh_read); <BR> toread = 0; <BR>@@ -229,6 +231,7 @@ <BR> offset = 0; <BR> de = (struct ext2_dir_entry_2 *) bh->b_data; <BR> while (1) { <BR>+ conditional_schedule(); /* Adding to a large directory */ <BR> if ((char *)de >= sb->s_blocksize + bh->b_data) { <BR> brelse (bh); <BR> bh = NULL; <BR> <BR>【 在 althea (痛并快乐着) 的大作中提到: 】 <BR>∶<I> 哪里可以找到? </I><BR> <BR> <BR>-- <BR> <BR>※ 来源:·BBS 水木清华站 smth.org·[FROM: 159.226.40.132] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -