Re: 4.0-rc1/PARISC: BUG: non-zero nr_pmds on freeing mm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 25 Feb 2015 23:57:57 +0200 "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]