linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: schwidefsky@de.ibm.com
To: linux-kernel@vger.kernel.org
Subject: Memory management bug
Date: Wed, 15 Nov 2000 13:39:13 +0100	[thread overview]
Message-ID: <C1256998.004585F4.00@d12mta07.de.ibm.com> (raw)



I think I spotted a problem in the memory management of some (all?)
architectures in 2.4.0-test10.  At the moment I am fighting with the 64bit
backend for the new S/390 machines. I experienced infinite loops in
do_check_pgt_cache because pgtable_cache_size indicated that a lot of pages
are in the quicklists but the pgd/pmd/pte quicklists have been empty (NULL
pointers). After some trickery with some special hardware feature (storage
keys) I found out that empty_bad_pmd_table and empty_bad_pte_table have
been put to the page table quicklists multiple(!) times. It is already a
bug that these two arrays are inserted into the quicklist at all but the
second insertation destroys the quicklists. I solved this problem by
inserting checks for the special entries in  the free_xxx_fast routines,
here is a sample for the i386 free_pte_fast:

diff -u -r1.5 pgalloc.h
--- include/asm-i386/pgalloc.h  2000/11/02 10:14:51     1.5
+++ include/asm-i386/pgalloc.h  2000/11/15 12:27:58
@@ -80,8 +80,11 @@
        return (pte_t *)ret;
 }

+extern pte_t empty_bad_pte_table[];
 extern __inline__ void free_pte_fast(pte_t *pte)
 {
+       if (pte == empty_bad_pte_table)
+               return;
        *(unsigned long *)pte = (unsigned long) pte_quicklist;
        pte_quicklist = (unsigned long *) pte;
        pgtable_cache_size++;

I still get the "__alloc_pages: 2-order allocation failed." error messages
but at least the machine doesn't go into infinite loops anymore. Could
someone with more experience with the other architectures verify that my
observation is true?

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com


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

             reply	other threads:[~2000-11-15 13:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-15 12:39 schwidefsky [this message]
2000-11-15 13:19 ` Memory management bug Andi Kleen
2000-11-15 16:45 ` Linus Torvalds
2000-11-15 13:24 schwidefsky
2000-11-16 16:12 schwidefsky
2000-11-16 17:01 ` Linus Torvalds
2000-11-16 17:45   ` Andrea Arcangeli
2000-11-16 18:07     ` Linus Torvalds
2000-11-17 10:41 schwidefsky
2000-11-17 15:44 ` Andrea Arcangeli
2000-11-17 19:12   ` Rik van Riel
2000-11-17 16:35 schwidefsky
2000-11-17 16:42 ` Linus Torvalds
2000-11-17 18:11 ` Andrea Arcangeli
2000-11-17 19:15   ` Rik van Riel
2000-11-21 19:55 schwidefsky

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=C1256998.004585F4.00@d12mta07.de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).