From: Andrew Morton <akpm@zip.com.au>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: linux-kernel@vger.kernel.org, riel@surriel.com
Subject: Re: fix CONFIG_HIGHPTE
Date: Tue, 06 Aug 2002 17:43:47 -0700 [thread overview]
Message-ID: <3D506D43.890EA215@zip.com.au> (raw)
In-Reply-To: 20020806231522.GJ6256@holomorphy.com
William Lee Irwin III wrote:
>
> Minimalistic fix. Perhaps rough at the edges but I can clean the
> ugliness ppl care about when they complain. 2.5.30 successfully booted
> & ran userspace on a 16-way NUMA-Q with 16GB of RAM with this patch
> and CONFIG_HIGHPTE enabled.
Thanks, Bill. It doesn't seem any uglier than anything else highmem-related.
> ...
> +#define rmap_ptep_map(pte_paddr) \
> +({ \
> + unsigned long pfn = (unsigned long)(pte_paddr >> PAGE_SHIFT); \
> + unsigned long idx = __pte_offset(((unsigned long)pte_paddr)); \
> + (pte_t *)kmap_atomic(pfn_to_page(pfn), KM_PTE2) + idx; \
> +})
Could be an inline?
> +static inline rmap_ptep_map(pte_addr_t pte_paddr)
> +{
> + return (pte_t *)pte_paddr;
> +}
Better try compiling that ;)
> ...
> --- 1.66/include/linux/mm.h Thu Aug 1 12:30:06 2002
> +++ edited/include/linux/mm.h Fri Aug 2 22:24:40 2002
> @@ -161,7 +161,7 @@
> union {
> struct pte_chain * chain; /* Reverse pte mapping pointer.
> * protected by PG_chainlock */
> - pte_t * direct;
> + pte_addr_t direct;
> } pte;
Four more bytes into struct page. I bet that hurt.
> ...
> struct pte_chain {
> struct pte_chain * next;
> - pte_t * ptep;
> + pte_addr_t ptep;
> };
We'll get fifteen pte_addr_t's per pte_chain on a P4 with the
array-of-pteps-per-pte_chain patch.
And we'll need that, to reduce load on KM_PTECHAIN. Because
there's no point in pte_highmem without also having pte_chain_highmem,
yes?
Which means either going back to a custom allocator or teaching
slab about highmem and kmap_atomic. (Probably a custom allocator;
internal fragmentation on 32/64/128 byte pte_chains won't be tooooo
bad, presumably).
We're piling more and more crap in there to support these pte_chains.
How much is too much?
Is it likely that large pages and/or shared pagetables would allow us to
place pagetables and pte_chains in the direct-mapped region, avoid all
this?
next prev parent reply other threads:[~2002-08-07 0:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-06 23:15 fix CONFIG_HIGHPTE William Lee Irwin III
2002-08-07 0:43 ` Andrew Morton [this message]
2002-08-07 0:50 ` Rik van Riel
2002-08-07 1:31 ` William Lee Irwin III
2002-08-07 4:00 ` Rik van Riel
2002-08-07 4:12 ` William Lee Irwin III
2002-08-07 1:07 ` Anton Blanchard
2002-08-07 1:55 ` William Lee Irwin III
2002-08-07 2:57 ` Andrew Morton
2002-08-07 18:43 ` Ingo Oeser
2002-08-08 14:51 ` Rik van Riel
2002-08-08 19:59 ` Alan Cox
2002-08-08 18:44 ` Rik van Riel
2002-08-08 19:22 ` William Lee Irwin III
2002-08-08 14:51 ` Martin J. Bligh
2002-08-09 14:10 ` Daniel Phillips
2002-08-09 14:07 ` Daniel Phillips
2002-08-07 4:05 ` Rik van Riel
2002-08-07 4:18 ` Anton Blanchard
2002-08-07 5:16 ` Martin J. Bligh
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=3D506D43.890EA215@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.com \
--cc=wli@holomorphy.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