[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-parisc
Subject: Re: 4.0-rc1/PARISC: BUG: non-zero nr_pmds on freeing mm
From: Andrew Morton <akpm () linux-foundation ! org>
Date: 2015-02-25 22:13:58
Message-ID: 20150225141358.8bd74b14c6e1ae039d25dc1c () linux-foundation ! org
[Download RAW message or body]
On Wed, 25 Feb 2015 23:57:57 +0200 "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> On Wed, Feb 25, 2015 at 01:31:40PM -0800, Andrew Morton wrote:
> > On Wed, 25 Feb 2015 22:47:43 +0200 "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> >
> > > > > If not, I can prepare a patchset which only adds missing
> > > > > __PAGETABLE_PUD_FOLDED and __PAGETABLE_PMD_FOLDED.
> > > >
> > > > Something simple would be preferred, but I don't know how much simpler
> > > > the above would be?
> > >
> > > Not much simplier: __PAGETABLE_PMD_FOLDED is missing in frv, m32r, m68k,
> > > mn10300, parisc and s390.
> >
> > I don't really know what's going on here. Let's rewind a bit, please.
> > What is the bug, what causes it, which commit caused it and why the
> > heck does it require a massive patchset to fix 4.0?
>
> PMD accounting happens in __pmd_alloc() and free_pmd_range(). PMD
> accounting only makes sense on architectures with 3 or more page tables
> levels. We use __PAGETABLE_PMD_FOLDED to check whether the PMD page table
> level exists.
>
> Unfortunately, some architectures don't use <asm-generic/pgtable-nopmd.h>
> to indicate that PMD level doesn't exists and fold it in a custom way.
> Some of them don't define __PAGETABLE_PMD_FOLDED as pgtable-nopmd.h does.
>
> Missing __PAGETABLE_PMD_FOLDED causes undeflow of mm->nr_pmds:
> __pmd_alloc() is never called, but we decrement mm->nr_pmds in
> free_pmd_range().
>
> These architecures need to be fixed to define __PAGETABLE_PMD_FOLDED too.
>
> I can do in one patch if you want. Or split per-arch. After that
> CONFIG_PGTABLE_LEVELS patchset will require rebasing.
I guess one patch will be OK - arch maintainers will be able
review/apply/test that easily enough.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic