Re: Signal 11

David Woodhouse
2000-12-08T22:59:30Z

On Fri, 8 Dec 2000, Jeff V. Merkey wrote:

> I have not seen it on UP systems either. I only see it on SMP systems.
> After trying very hard last night, I was able to get my 4 x PPro system to
> do it with 2.4.0-12. It seems related to loading in some way. If you
> have more than two processors, the loading is less since there's more
> processors, and for whatever reason, it makes it harder to produce
> whatever race condition is causing it. I can get it to happen
> pretty easily on a 2 x PII system.

Can you reproduce it with bcrl's patch below:

Index: mm/memory.c
===================================================================
RCS file: /net/passion/inst/cvs/linux/mm/memory.c,v
retrieving revision 1.2.2.40
diff -u -r1.2.2.40 memory.c
--- mm/memory.c 2000/12/05 13:33:39 1.2.2.40
+++ mm/memory.c 2000/12/08 22:24:09
@@ -860,6 +860,7 @@
/*
* Ok, we need to copy. Oh, well..
*/
+ set_pte(page_table, pte);
spin_unlock(&mm->page_table_lock);
new_page = page_cache_alloc();
if (!new_page)
@@ -870,6 +871,12 @@
* Re-check the pte - we dropped the lock
*/
if (pte_same(*page_table, pte)) {
+ /* We are changing the pte, so get rid of the old
+ * one to avoid races with the hardware, this really
+ * only affects the accessed bit here.
+ */
+ pte = ptep_get_and_clear(page_table);
+
if (PageReserved(old_page))
++mm->rss;
break_cow(vma, old_page, new_page, address, page_table);
@@ -1216,12 +1223,14 @@
return do_swap_page(mm, vma, address, pte,
pte_to_swp_entry(entry), write_access);
}

+ entry = ptep_get_and_clear(pte);
if (write_access) {
if (!pte_write(entry))
return do_wp_page(mm, vma, address, pte, entry);

entry = pte_mkdirty(entry);
}
+
entry = pte_mkyoung(entry);
establish_pte(vma, address, pte, entry);
spin_unlock(&mm->page_table_lock);

--
dwmw2