From: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-arch@vger.kernel.org
Subject: Re: regression: 2f569af (CONFIG_HIGHPTE vs. sub-page page tables.)
Date: Tue, 26 Feb 2008 15:38:58 +0100 [thread overview]
Message-ID: <20080226143858.GA11590@digi.com> (raw)
In-Reply-To: <1203958582.3247.3.camel@localhost>
Hello Martin,
Martin Schwidefsky wrote:
> On Mon, 2008-02-25 at 14:26 +0100, Uwe Kleine-König wrote:
> > I see the following:
> >
> > / # for i in 1 2 3; do grep PageTables /proc/meminfo; done
> > PageTables: 4 kB
> > PageTables: 4294967292 kB
> > PageTables: 4294967284 kB
> >
> > and I bisected it down to 2f569af (CONFIG_HIGHPTE vs. sub-page page
> > tables.) This still happens in 2.6.25-rc3.
> >
> > I have not investigated further, so I cannot tell if it's only the
> > output in meminfo that is broken.
> >
> > This is on ARCH=arm, on a Digi cc9p9360 with ns9xxx_defconfig.
>
> Hmm, not good. The number obviously went negative. There is an imbalance
> in the number of pgtable_page_ctor vs. pgtable_page_dtor. Could you try
> this patch and watch for warnings?
It doesn't trigger.
And your assumption that there is an imbalance between pgtable_page_ctor
and pgtable_page_dtor is wrong, too. I added some debug output to both
of the two functions and for one grep both are executed seven times.
Moreover a "grep PageTables /proc/meminfo" resulted in
9x __dec_zone_state with item == NR_PAGETABLE
7x __inc_zone_state with item == NR_PAGETABLE
All those 16 calles where done via __(inc|dec)_zone_page_state.
... some time later ...
I got it. This code is currently in free_pgd_slow():
pte = pmd_page(*pmd);
pmd_clear(pmd);
dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE);
pte_lock_deinit(pte);
pte_free(mm, pte);
pmd_free(mm, pmd);
So because (since 2f569af) pte_free does dec_zone_page_state and
pte_lock_deinit, these two happen twice here.
Removing the calls to dec_zone_page_state() and pte_lock_deinit() in
free_pgd_slow() fixed it for me.
For a complete fix we might want to change the type of pte?
Best regards
Uwe
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
next prev parent reply other threads:[~2008-02-26 14:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-25 13:26 regression: 2f569af (CONFIG_HIGHPTE vs. sub-page page tables.) Uwe Kleine-König
2008-02-25 13:38 ` Russell King
2008-02-25 15:32 ` Uwe Kleine-König
2008-02-25 15:45 ` let __dec_zone_page_state use __dec_zone_state Uwe Kleine-König
2008-02-27 19:10 ` Christoph Lameter
2008-02-29 7:45 ` Uwe Kleine-König
2008-02-29 19:32 ` Christoph Lameter
2008-02-25 16:56 ` regression: 2f569af (CONFIG_HIGHPTE vs. sub-page page tables.) Martin Schwidefsky
2008-02-26 14:38 ` Uwe Kleine-König [this message]
2008-02-26 17:57 ` Martin Schwidefsky
2008-02-26 19:49 ` Russell King
2008-02-27 12:44 ` Uwe Kleine-König
2008-02-27 14:21 ` Martin 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=20080226143858.GA11590@digi.com \
--to=uwe.kleine-koenig@digi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=torvalds@linux-foundation.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 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.