linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Juan J. Quintela" <quintela@fi.udc.es>
To: linux-mm@kvack.org, Linus Torvalds <torvalds@transmeta.com>,
	Andrea Arcangeli <andrea@suse.de>,
	Kanoj Sarcar <kanoj@google.engr.sgi.com>
Subject: Re: Oops in __free_pages_ok (pre7-1) (Long)
Date: 02 May 2000 03:08:02 +0200	[thread overview]
Message-ID: <yttg0s13gjx.fsf@vexeta.dc.fi.udc.es> (raw)
In-Reply-To: "Juan J. Quintela"'s message of "02 May 2000 01:29:26 +0200"

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/

             reply	other threads:[~2000-05-02  1:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02  1:08 Juan J. Quintela [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yttg0s13gjx.fsf@vexeta.dc.fi.udc.es \
    --to=quintela@fi.udc.es \
    --cc=andrea@suse.de \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox