From: Hugh Dickins <hugh@veritas.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: akpm@osdl.org, nickpiggin@yahoo.com.au, tony.luck@intel.com,
benh@kernel.crashing.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] freepgt: free_pgtables use vma list
Date: Tue, 22 Mar 2005 21:51:39 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0503222142280.9761@goblin.wat.veritas.com> (raw)
In-Reply-To: <20050322123301.090cbfa6.davem@davemloft.net>
On Tue, 22 Mar 2005, David S. Miller wrote:
> On Tue, 22 Mar 2005 19:36:46 +0000 (GMT)
> Hugh Dickins <hugh@veritas.com> wrote:
>
> > I notice that although both i386 and sparc64 use pgtable-nopud.h, the
> > i386 pud_clear does nothing at all and the sparc64 pud_clear resets to 0.
>
> This was a dead end. I386 doesn't do anything with pud_clear() in
> order to work around a chip erratum.
>
> IA64 does clear in pud_clear() just like sparc64.
My mind kept flipping back and forth on whether it was pud_clear().
I agree, I can't see that it's the issue now.
> I think it's the floor/ceiling stuff.
>
> At that pud_clear(), we do it if floor-->ceiling (after masking)
> covers the whole PUD. Not whether start/end do, which is what
> the code sort of does right now.
Not an explanation I understood ;)
> "start" and "end" say which specific entries we might be purging.
Yes.
> "floor" and "ceiling" say that once that purging is done, the
> extent of the potential address space freed.
Well, they specify the limits beyond which we cannot free,
because there's other stuff still making use of addresses beyond.
> I cooked up a quick patch that changes the logic to:
>
> floor &= PUD_MASK;
> ceiling &= PUD_MASK;
> if (floor - 1 >= ceiling - 1)
> return;
That can't be right. In exit_mmap, for example, floor will be 0
throughout, and the condition will be true for all values of ceiling.
> pmd = pmd_offset(pud, start);
> pud_clear(pud);
> pmd_free_tlb(tlb, pmd);
>
> and things start to basically work.
Because none of your higher level tables are being freed at all:
eventually you'll run out of memory.
I still can't see what's wrong with the code that's already
there. My brain is seizing up, I'm taking a break.
Hugh
next prev parent reply other threads:[~2005-03-22 21:55 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 20:52 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 [this message]
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
2005-03-23 13:28 ` Hugh Dickins
2005-03-23 23:07 ` Benjamin Herrenschmidt
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=Pine.LNX.4.61.0503222142280.9761@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®