From: Hugh Dickins <hugh@veritas.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Nick Piggin <nickpiggin@yahoo.com.au>,
akpm@osdl.org, 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 18:48:23 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.61.0503221830560.9034@goblin.wat.veritas.com> (raw)
In-Reply-To: <B8E391BBE9FE384DAA4C5C003888BE6F0321137B@scsmsx401.amr.corp.intel.com>
On Tue, 22 Mar 2005, Luck, Tony wrote:
> >> For example, you may have a single page (start,end) address range
> >> to free, but if this is enclosed by a large enough (floor,ceiling)
> >> then it may free an entire pgd entry.
> >>
> >> I assume the intention of the API would be to provide the full
> >> pgd width in that case?
> >
> >Yes, that is what should happen if the full PGD entry is liberated.
> >
> >Any time page table chunks are liberated, they have to be included
> >in the range passed to the flush_tlb_pgtables() call.
This now makes it crystal clear to me that Nick's suspicion was right,
my start,end to flush_tlb_pgtables is too narrow. I'll take another
look there and correct it.
> So should this part of Hugh's code:
>
> /*
> * Optimization: gather nearby vmas into one call down
> */
> while (next && next->vm_start <= vma->vm_end + PMD_SIZE
> && !is_hugepage_only_range(next->vm_start, HPAGE_SIZE)){
> vma = next;
> next = vma->vm_next;
> }
> free_pgd_range(tlb, addr, vma->vm_end,
> floor, next? next->vm_start: ceiling);
>
> be changed to use pgd_addr_end() to gather up all the vma that
> are mapped by a single pgd instead of just spanning out the next
> PMD_SIZE?
Oh, I don't think so. I suppose it could be done at this level,
but then the lower levels would go back to searching through lots
of unnecessary cachelines to find the significant entries, and
we might as well throw out the whole set of patches (which will
soon happen anyway if we can't find why they're not working!).
No, we don't have to pass pgd granularity to flush_tlb_pgtables,
we just have to try a bit harder to supply the right span to it,
whatever that is. It might be in pmd granularity, it might be in
pud granularity (if we freed some at that level), it might be in
pgd granularity (if we freed some at that level).
> On ia64 we can have a vma big enough to require more than one pgd, but
Yes, no problem.
> in the case that we span, we won't cross the problematic pgd boundaries
> where the holes in the address space are lurking.
Yes, it wouldn't be a hole if a vma was allowed into it.
I do assume that on all architectures, the peculiar regions (might be
holes, might be huge-only regions) are separated from the ordinary
ones by pgd boundaries.
Hugh
next prev parent reply other threads:[~2005-03-22 18:49 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 18:06 Luck, Tony
2005-03-22 18:48 ` Hugh Dickins [this message]
-- strict thread matches above, loose matches on Subject: below --
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
2005-03-22 22:40 Luck, Tony
2005-03-22 23:30 ` David S. Miller
2005-03-23 0:40 ` Hugh Dickins
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-21 20:52 Hugh Dickins
2005-03-21 22:26 ` 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
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
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.0503221830560.9034@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®