Linux-kernel mailing list archive 1999-23,: Re: 2.2.9-ac2 locks solid

# Re: 2.2.9-ac2 locks solid

Andrea Arcangeli (andrea@suse.de)
Mon, 7 Jun 1999 22:48:37 +0200 (CEST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Andrea Arcangeli: "Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks"
- Previous message: Miquel van Smoorenburg: "Re: Kernel 2.2.x bug. Standard output not flushed before fork"

On Mon, 7 Jun 1999, George wrote:

>kernel to kill things, it printed a few oopses though. Not sure if IKD or
>the real kernel made them:

Please try again over a clean 2.2.9 plus the SLAB_ATOMIC fix in signal.c
(do it by hand) and plus this patch below (that fixes some other SMP
trouble):

Index: linux//mm/memory.c
===================================================================
RCS file: /var/cvs/linux/mm/memory.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 memory.c
--- linux//mm/memory.c 1999/04/17 14:27:30 1.1.1.4
+++ linux//mm/memory.c 1999/06/07 15:58:06
@@ -652,36 +652,42 @@
delete_from_swap_cache(page_map);
/* FallThrough */
case 1:
- /* We can release the kernel lock now.. */
- unlock_kernel();
-
flush_cache_page(vma, address);
set_pte(page_table, pte_mkdirty(pte_mkwrite(pte)));
flush_tlb_page(vma, address);
end_wp_page:
+ /*
+ * We can release the kernel lock now.. Now swap_out will see
+ * a dirty page and so won't get confused and flush_tlb_page
+ * won't SMP race. -Andrea
+ */
+ unlock_kernel();
+
if (new_page)
free_page(new_page);
return 1;
}
- unlock_kernel();
if (!new_page)
- return 0;
+ goto no_new_page;
- if (PageReserved(mem_map + MAP_NR(old_page)))
+ if (PageReserved(page_map))
++vma->vm_mm->rss;
copy_cow_page(old_page,new_page);
flush_page_to_ram(old_page);
flush_page_to_ram(new_page);
flush_cache_page(vma, address);
set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));
- free_page(old_page);
flush_tlb_page(vma, address);
+ unlock_kernel();
+ __free_page(page_map);
return 1;
bad_wp_page:
printk("do_wp_page: bogus page at address %08lx (%08lx)\n",address,old_page);
send_sig(SIGKILL, tsk, 1);
+no_new_page:
+ unlock_kernel();
if (new_page)
free_page(new_page);
return 0;

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Andrea Arcangeli: "Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks"
- Previous message: Miquel van Smoorenburg: "Re: Kernel 2.2.x bug. Standard output not flushed before fork"