From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>,
nickpiggin@yahoo.com.au, davem@davemloft.net,
tony.luck@intel.com,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] freepgt: free_pgtables use vma list
Date: Wed, 23 Mar 2005 10:30:50 +1100 [thread overview]
Message-ID: <1111534250.16224.22.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.61.0503221617440.8666@goblin.wat.veritas.com>
On Tue, 2005-03-22 at 16:37 +0000, Hugh Dickins wrote:
> On Tue, 22 Mar 2005, Andrew Morton wrote:
> >
> > With these six patches the ppc64 is hitting the BUG in exit_mmap():
> >
> > BUG_ON(mm->nr_ptes); /* This is just debugging */
> >
> > fairly early in boot.
>
> So ppc64 is in the same boat as sparc64 (yet ia64 okay so far).
>
> Sorry, I'm still clueless.
>
> I cannot see those arches doing pte_allocs outside their vmas,
> that of course could cause it. And nr_ptes is initialized to 0
> once by memset and again by assignment, so it should be starting
> out even zeroer than most fields.
We do funny things in arch/ppc64/mm/init.c in the ioremap_mm, where we
don't use VMAs but our own mecanism (yah, ugly, but that's some legacy
we have from the original port, though I do intend to change that at one
point).
> I should probably be paying more attention to the repellent
> notion that my code is broken.
>
> If you and David could try the lame patch below,
> it'll at least give us a slight clue of where to be looking -
> every mm exiting with nr_ptes 1 means something different from
> every mm exiting with nr_ptes -1 means something different from
> occasional mms exiting with nr_ptes something positive.
>
> I'm not sure whether the patch would ever get to show a more
> interesting proc name than "?".
>
> And does memory leak away into lost pagetables if you continue
> running, or does it actually carry on running fine, and the
> problem appear to be with the BUG_ON itself?
>
> Thanks,
> Hugh
>
> --- freepgt6/mm/mmap.c 2005-03-22 04:28:40.000000000 +0000
> +++ testing/mm/mmap.c 2005-03-22 15:45:00.000000000 +0000
> @@ -1896,6 +1896,7 @@ EXPORT_SYMBOL(do_brk);
> /* Release all mmaps. */
> void exit_mmap(struct mm_struct *mm)
> {
> + static unsigned long good_mms, bad_mms;
> struct mmu_gather *tlb;
> struct vm_area_struct *vma = mm->mmap;
> unsigned long nr_accounted = 0;
> @@ -1931,7 +1932,14 @@ void exit_mmap(struct mm_struct *mm)
> vma = next;
> }
>
> - BUG_ON(mm->nr_ptes); /* This is just debugging */
> + if (mm->nr_ptes && bad_mms < 250) {
> + printk(KERN_ERR "exit_mmap: %s nr_ptes %ld good_mms %lu\n",
> + current->mm == mm? current->comm: "?",
> + (long)mm->nr_ptes, good_mms);
> + good_mms = 0;
> + bad_mms++;
> + } else
> + good_mms++;
> }
>
> /* Insert vm structure into process list sorted by address
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
next prev parent reply other threads:[~2005-03-22 23:31 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 20:52 [PATCH 1/5] freepgt: free_pgtables use vma list Hugh Dickins
2005-03-21 20:55 ` [PATCH 2/5] freepgt: remove MM_VM_SIZE(mm) Hugh Dickins
2005-03-21 20:56 ` [PATCH 3/5] freepgt: hugetlb_free_pgd_range Hugh Dickins
2005-03-21 20:57 ` [PATCH 4/5] freepgt: remove arch pgd_addr_end Hugh Dickins
2005-03-21 20:58 ` [PATCH 5/5] freepgt: mpnt to vma cleanup Hugh Dickins
2005-03-21 22:26 ` [PATCH 1/5] freepgt: free_pgtables use vma list David S. Miller
2005-03-22 5:47 ` Hugh Dickins
2005-03-22 17:41 ` David S. Miller
2005-03-22 11:40 ` Andrew Morton
2005-03-22 12:17 ` Nick Piggin
2005-03-22 16:37 ` Hugh Dickins
2005-03-22 18:34 ` David S. Miller
2005-03-22 19:01 ` David S. Miller
2005-03-22 19:21 ` David S. Miller
2005-03-22 19:23 ` David S. Miller
2005-03-22 19:36 ` Hugh Dickins
2005-03-22 20:21 ` David S. Miller
2005-03-22 23:45 ` Benjamin Herrenschmidt
2005-03-22 20:33 ` David S. Miller
2005-03-22 21:51 ` Hugh Dickins
2005-03-22 22:41 ` David S. Miller
2005-03-23 0:51 ` Hugh Dickins
2005-03-23 2:09 ` David S. Miller
2005-03-22 23:32 ` Nick Piggin
2005-03-22 23:44 ` David S. Miller
2005-03-23 0:19 ` Nick Piggin
2005-03-23 0:20 ` David S. Miller
2005-03-23 0:00 ` David S. Miller
2005-03-23 0:03 ` David S. Miller
2005-03-22 21:28 ` David S. Miller
2005-03-22 23:30 ` Benjamin Herrenschmidt [this message]
2005-03-23 13:28 ` Hugh Dickins
2005-03-23 23:07 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2005-03-21 22:31 Luck, Tony
2005-03-21 23:02 ` David S. Miller
2005-03-22 4:14 ` Nick Piggin
2005-03-22 5:29 ` David S. Miller
2005-03-22 6:08 ` Hugh Dickins
2005-03-22 6:33 ` Nick Piggin
2005-03-22 17:52 ` David S. Miller
2005-03-22 17:55 ` David S. Miller
2005-03-22 5:42 ` Hugh Dickins
2005-03-22 18:06 Luck, Tony
2005-03-22 18:48 ` Hugh Dickins
2005-03-22 22:40 Luck, Tony
2005-03-22 23:30 ` David S. Miller
2005-03-23 0:40 ` Hugh Dickins
2005-03-22 23:53 Luck, Tony
2005-03-22 23:56 ` David S. Miller
2005-03-23 0:56 ` Hugh Dickins
2005-03-23 1:10 ` Andrew Morton
2005-03-23 2:00 ` David S. Miller
2005-03-23 2:10 ` Nick Piggin
2005-03-23 2:15 ` David S. Miller
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=1111534250.16224.22.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=tony.luck@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.