linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: Oops in __free_pages_ok (pre7-1) (Long)
@ 2000-05-02  1:08 Juan J. Quintela
  2000-05-02 20:43 ` Linus Torvalds
  2000-05-02 22:08 ` Andrea Arcangeli
  0 siblings, 2 replies; 16+ messages in thread
From: Juan J. Quintela @ 2000-05-02  1:08 UTC (permalink / raw)
  To: linux-mm, Linus Torvalds, Andrea Arcangeli, Kanoj Sarcar

Hi
        several people have reported Oops in __free_pages_ok, after a
BUG() in page_alloc.h.  This happens in 2.3.99-pre[67].  The BUGs are:

	if (page->mapping)
		BUG();
and
	if (PageSwapCache(page))
		BUG();
somebody reported to me that he obtained the BUG:
	if (PageLocked(page))
		BUG();

I have found that this patch solves the Oops for me. (I know that this
is not the proper solution, could people test this patch and mail me
if the Oops disappear/or go worst?  I am trying to isolate the
problem.  Now I get one kill of the process from the VM, I am
interested to know if this is the case for the rest of the people with
this problem.

I have read the comments from Andrea in this list about that
PG_swap_entry bit should be only a optimization, never produce
instability.  I have checked that with the following patch (i.e. the
only place when we set that bit) I don't get more Oops.

This bit is only used in three places in the kernel:

mm/memory.c:1056:do_swap_page()::SetPageSwapEntry(page);
        The only place where it is set

mm/swapfile.c:210:acquire_swap_entry():	if (!PageSwapEntry(page))
        Here we check if it is set, and if true, we check that the
        values are valid.

mm/swap_state.c:134:	ClearPageSwapEntry(page);
        We clear the bit in free_page_and_swap_cache(), but I am not
        sure that it is the only place when it must be deleted.
        Comments really appreciated.

It appears that we forgot to remove some bits/values when we free a
page. It has been several patches in this list regarding the
swap_entry bit, but not agreement in which is the correct one.

I hope this help to somebody understand where is the problem, or at
least give me some hint where can be the problem.

Thanks in advance, Juan.

diff -u -urN --exclude=CVS --exclude=*~ --exclude=.#* pre7-1plus/mm/memory.c lin
ux/mm/memory.c
--- pre7-1plus/mm/memory.c      Tue Apr 25 00:46:18 2000
+++ linux/mm/memory.c   Tue May  2 00:36:13 2000
@@ -1053,7 +1053,7 @@
 
        pte = mk_pte(page, vma->vm_page_prot);
 
-       SetPageSwapEntry(page);
+       /*      SetPageSwapEntry(page);  */
 
        /*
         * Freeze the "shared"ness of the page, ie page_count + swap_count.


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2000-05-03 10:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-02  1:08 Oops in __free_pages_ok (pre7-1) (Long) Juan J. Quintela
2000-05-02 20:43 ` Linus Torvalds
2000-05-02 21:31   ` Juan J. Quintela
2000-05-02 21:40     ` Linus Torvalds
2000-05-02 22:06       ` Juan J. Quintela
2000-05-02 22:26       ` Andrea Arcangeli
2000-05-03  0:38         ` Andrea Arcangeli
2000-05-03  0:45           ` Linus Torvalds
2000-05-03  1:28             ` Andrea Arcangeli
2000-05-03 10:37           ` Rik van Riel
2000-05-02 22:02     ` Andrea Arcangeli
2000-05-02 22:13       ` Juan J. Quintela
2000-05-03  0:43       ` Andrea Arcangeli
2000-05-02 22:54     ` Andrea Arcangeli
2000-05-02 22:08 ` Andrea Arcangeli
2000-05-02 23:58   ` Juan J. Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox