* BUG: non-zero nr_pmds on freeing mm: -1
@ 2015-03-11 2:44 John David Anglin
[not found] ` <CADjby3WS3cJs2BOmYT4Cdr4i9FncD=BYjrkuQiBH3=VmOndRPw@mail.gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: John David Anglin @ 2015-03-11 2:44 UTC (permalink / raw)
To: linux-parisc List
With 4.0.0-rc3+ #1 SMP, I get hundreds of these BUG messages:
BUG: non-zero nr_pmds on freeing mm: -1
However, system does boot.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
[not found] ` <CADjby3WS3cJs2BOmYT4Cdr4i9FncD=BYjrkuQiBH3=VmOndRPw@mail.gmail.com>
@ 2015-03-11 14:14 ` John David Anglin
2015-03-11 23:31 ` Graham Gower
0 siblings, 1 reply; 10+ messages in thread
From: John David Anglin @ 2015-03-11 14:14 UTC (permalink / raw)
To: Domenico Andreoli; +Cc: linux-parisc List
On 2015-03-11 7:32 AM, Domenico Andreoli wrote:
> I also do. Related to https://lkml.org/lkml/2015/2/13/431?
More info is here:
http://www.spinics.net/lists/linux-mm/msg84937.html
There doesn't seem to be a patch yet.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-11 14:14 ` John David Anglin
@ 2015-03-11 23:31 ` Graham Gower
2015-03-12 0:21 ` John David Anglin
0 siblings, 1 reply; 10+ messages in thread
From: Graham Gower @ 2015-03-11 23:31 UTC (permalink / raw)
To: John David Anglin; +Cc: Domenico Andreoli, linux-parisc List, kirill
I thought this patch was supposed to address the problem?
https://lkml.org/lkml/2015/2/26/230
However, its not fixed it for me either in 4.0.0-rc3.
-Graham
On 12 March 2015 at 00:44, John David Anglin <dave.anglin@bell.net> wrote:
> On 2015-03-11 7:32 AM, Domenico Andreoli wrote:
>>
>> I also do. Related to https://lkml.org/lkml/2015/2/13/431?
>
> More info is here:
> http://www.spinics.net/lists/linux-mm/msg84937.html
>
> There doesn't seem to be a patch yet.
>
>
> Dave
>
> --
> John David Anglin dave.anglin@bell.net
>
> --
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-11 23:31 ` Graham Gower
@ 2015-03-12 0:21 ` John David Anglin
2015-03-12 19:35 ` Aaro Koskinen
0 siblings, 1 reply; 10+ messages in thread
From: John David Anglin @ 2015-03-12 0:21 UTC (permalink / raw)
To: Graham Gower; +Cc: Domenico Andreoli, linux-parisc List, kirill
On 2015-03-11, at 7:31 PM, Graham Gower wrote:
> I thought this patch was supposed to address the problem?
> https://lkml.org/lkml/2015/2/26/230
>
> However, its not fixed it for me either in 4.0.0-rc3.
I doubt the patch is correct for parisc. I believe the system where I saw the BUG messages
has PT_NLEVELS == 3.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-12 0:21 ` John David Anglin
@ 2015-03-12 19:35 ` Aaro Koskinen
2015-03-12 19:51 ` John David Anglin
0 siblings, 1 reply; 10+ messages in thread
From: Aaro Koskinen @ 2015-03-12 19:35 UTC (permalink / raw)
To: John David Anglin
Cc: Graham Gower, Domenico Andreoli, linux-parisc List, kirill
Hi,
On Wed, Mar 11, 2015 at 08:21:35PM -0400, John David Anglin wrote:
> On 2015-03-11, at 7:31 PM, Graham Gower wrote:
> > I thought this patch was supposed to address the problem?
> > https://lkml.org/lkml/2015/2/26/230
> >
> > However, its not fixed it for me either in 4.0.0-rc3.
>
> I doubt the patch is correct for parisc. I believe the system where
> I saw the BUG messages has PT_NLEVELS == 3.
For 32-bit kernels, the fix helped.
A.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-12 19:35 ` Aaro Koskinen
@ 2015-03-12 19:51 ` John David Anglin
2015-03-12 20:15 ` Aaro Koskinen
2015-03-12 22:07 ` Kirill A. Shutemov
0 siblings, 2 replies; 10+ messages in thread
From: John David Anglin @ 2015-03-12 19:51 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: Graham Gower, Domenico Andreoli, linux-parisc List, kirill
On 2015-03-12 3:35 PM, Aaro Koskinen wrote:
> Hi,
>
> On Wed, Mar 11, 2015 at 08:21:35PM -0400, John David Anglin wrote:
>> On 2015-03-11, at 7:31 PM, Graham Gower wrote:
>>> I thought this patch was supposed to address the problem?
>>> https://lkml.org/lkml/2015/2/26/230
>>>
>>> However, its not fixed it for me either in 4.0.0-rc3.
>> I doubt the patch is correct for parisc. I believe the system where
>> I saw the BUG messages has PT_NLEVELS == 3.
> For 32-bit kernels, the fix helped.
32-bit kernels have PT_NLEVELS == 2. I think the define needs to be
moved outside #if/#endif
but didn't get a chance to test last night.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-12 19:51 ` John David Anglin
@ 2015-03-12 20:15 ` Aaro Koskinen
2015-03-12 20:47 ` John David Anglin
2015-03-12 22:07 ` Kirill A. Shutemov
1 sibling, 1 reply; 10+ messages in thread
From: Aaro Koskinen @ 2015-03-12 20:15 UTC (permalink / raw)
To: John David Anglin
Cc: Graham Gower, Domenico Andreoli, linux-parisc List, kirill
Hi,
On Thu, Mar 12, 2015 at 03:51:11PM -0400, John David Anglin wrote:
> On 2015-03-12 3:35 PM, Aaro Koskinen wrote:
> >On Wed, Mar 11, 2015 at 08:21:35PM -0400, John David Anglin wrote:
> >>On 2015-03-11, at 7:31 PM, Graham Gower wrote:
> >>>I thought this patch was supposed to address the problem?
> >>>https://lkml.org/lkml/2015/2/26/230
> >>>
> >>>However, its not fixed it for me either in 4.0.0-rc3.
> >>I doubt the patch is correct for parisc. I believe the system where
> >>I saw the BUG messages has PT_NLEVELS == 3.
> >For 32-bit kernels, the fix helped.
> 32-bit kernels have PT_NLEVELS == 2. I think the define needs to be moved
> outside #if/#endif
> but didn't get a chance to test last night.
Not sure if that would be correct. The fix disabled PMD accounting
on 32-bit kernels because that level does not exist, but on
64-bit you probably would need it? Maybe your bug is different.
Does it occur on every process exit, or just occasionally?
(On 32-bit every exit triggered it.)
A.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-12 20:15 ` Aaro Koskinen
@ 2015-03-12 20:47 ` John David Anglin
0 siblings, 0 replies; 10+ messages in thread
From: John David Anglin @ 2015-03-12 20:47 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: Graham Gower, Domenico Andreoli, linux-parisc List, kirill
On 2015-03-12 4:15 PM, Aaro Koskinen wrote:
> Not sure if that would be correct. The fix disabled PMD accounting
> on 32-bit kernels because that level does not exist, but on
> 64-bit you probably would need it? Maybe your bug is different.
> Does it occur on every process exit, or just occasionally?
> (On 32-bit every exit triggered it.)
I would guess it occurs on every process exit. Note it is mm -1 which I
didn't see in any
of the other messages that I looked at.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
2015-03-12 19:51 ` John David Anglin
2015-03-12 20:15 ` Aaro Koskinen
@ 2015-03-12 22:07 ` Kirill A. Shutemov
[not found] ` <BLU437-SMTP12BED7F073649D0DDB5D0A97070@phx.gbl>
1 sibling, 1 reply; 10+ messages in thread
From: Kirill A. Shutemov @ 2015-03-12 22:07 UTC (permalink / raw)
To: John David Anglin
Cc: Aaro Koskinen, Graham Gower, Domenico Andreoli, linux-parisc List
On Thu, Mar 12, 2015 at 03:51:11PM -0400, John David Anglin wrote:
> On 2015-03-12 3:35 PM, Aaro Koskinen wrote:
> >Hi,
> >
> >On Wed, Mar 11, 2015 at 08:21:35PM -0400, John David Anglin wrote:
> >>On 2015-03-11, at 7:31 PM, Graham Gower wrote:
> >>>I thought this patch was supposed to address the problem?
> >>>https://lkml.org/lkml/2015/2/26/230
> >>>
> >>>However, its not fixed it for me either in 4.0.0-rc3.
> >>I doubt the patch is correct for parisc. I believe the system where
> >>I saw the BUG messages has PT_NLEVELS == 3.
> >For 32-bit kernels, the fix helped.
> 32-bit kernels have PT_NLEVELS == 2. I think the define needs to be moved
> outside #if/#endif
> but didn't get a chance to test last night.
There's hack in pgd_alloc() on parisc to initialize one pmd, which is not
accounted and we get underflow on exit. We need to adjust accounting for
that pmd.
Could you try the patch below?
diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
index f213f5b4c423..8ee9a0bdc468 100644
--- a/arch/parisc/include/asm/pgalloc.h
+++ b/arch/parisc/include/asm/pgalloc.h
@@ -38,6 +38,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
/* The first pmd entry also is marked with _PAGE_GATEWAY as
* a signal that this pmd may not be freed */
__pgd_val_set(*pgd, PxD_FLAG_ATTACHED);
+ mm_inc_nr_pmds(mm);
#endif
}
return actual_pgd;
--
Kirill A. Shutemov
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: BUG: non-zero nr_pmds on freeing mm: -1
[not found] ` <BLU437-SMTP12BED7F073649D0DDB5D0A97070@phx.gbl>
@ 2015-03-13 10:29 ` Kirill A. Shutemov
0 siblings, 0 replies; 10+ messages in thread
From: Kirill A. Shutemov @ 2015-03-13 10:29 UTC (permalink / raw)
To: John David Anglin
Cc: Aaro Koskinen, Graham Gower, Domenico Andreoli, linux-parisc List
On Thu, Mar 12, 2015 at 08:41:37PM -0400, John David Anglin wrote:
> On 2015-03-12, at 6:07 PM, Kirill A. Shutemov wrote:
>
> > There's hack in pgd_alloc() on parisc to initialize one pmd, which is not
> > accounted and we get underflow on exit. We need to adjust accounting for
> > that pmd.
> >
> > Could you try the patch below?
> >
> > diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
> > index f213f5b4c423..8ee9a0bdc468 100644
> > --- a/arch/parisc/include/asm/pgalloc.h
> > +++ b/arch/parisc/include/asm/pgalloc.h
> > @@ -38,6 +38,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
> > /* The first pmd entry also is marked with _PAGE_GATEWAY as
> > * a signal that this pmd may not be freed */
> > __pgd_val_set(*pgd, PxD_FLAG_ATTACHED);
> > + mm_inc_nr_pmds(mm);
> > #endif
> > }
> > return actual_pgd;
>
> The patch fixes the BUG messages.
>
> Helge, the #ifdef in pgd_alloc doesn't seem correct. We only have a L2/L3 scheme when
> "defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB)".
Looks like you're correct. But that's separate issue. Please, post a
patch.
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-03-13 10:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 2:44 BUG: non-zero nr_pmds on freeing mm: -1 John David Anglin
[not found] ` <CADjby3WS3cJs2BOmYT4Cdr4i9FncD=BYjrkuQiBH3=VmOndRPw@mail.gmail.com>
2015-03-11 14:14 ` John David Anglin
2015-03-11 23:31 ` Graham Gower
2015-03-12 0:21 ` John David Anglin
2015-03-12 19:35 ` Aaro Koskinen
2015-03-12 19:51 ` John David Anglin
2015-03-12 20:15 ` Aaro Koskinen
2015-03-12 20:47 ` John David Anglin
2015-03-12 22:07 ` Kirill A. Shutemov
[not found] ` <BLU437-SMTP12BED7F073649D0DDB5D0A97070@phx.gbl>
2015-03-13 10:29 ` Kirill A. Shutemov
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.