From: Dave Hansen <haveblue@us.ibm.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
Andi Kleen <ak@suse.de>, Paul Mackerras <paulus@samba.org>,
Andrew Morton <akpm@osdl.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"Randy.Dunlap" <rdunlap@xenotime.net>,
"Protasevich, Natalie" <Natalie.Protasevich@unisys.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
Andy Whitcroft <apw@shadowen.org>
Subject: Re: [PATCH] x86_64: Make NR_IRQS configurable in Kconfig
Date: Wed, 09 Aug 2006 11:25:48 -0700 [thread overview]
Message-ID: <1155147948.19249.171.camel@localhost.localdomain> (raw)
In-Reply-To: <20060809175854.GA14382@intel.com>
On Wed, 2006-08-09 at 10:58 -0700, Luck, Tony wrote:
> On Tue, Aug 08, 2006 at 10:17:53AM +0200, Martin Schwidefsky wrote:
> > "vmalloc reserve first; allocate pages later" would be a really nice
> > feature. We could use this on s390 to implement the virtual mem_map
> > array spanning the whole 64 bit address range (with holes in it). To
> > make it perfect a "deallocate pages; keep vmalloc reserve" should be
> > added, then we could free parts of the mem_map array again on hot memory
> > remove.
Martin,
We can already do this partial freeing today with sparsemem and memory
hot-remove. It would be a shame to go have to do another implementation
for each an every architecture that wants to do it.
For the very sparse 64-bit address spaces, I would be really interested
to see an alternate pfn_to_section_nr() that relies on something other
than a direct correlation between physical address and section number.
Instead of:
#define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT)
We could do:
static inline unsigned long pfn_to_section_nr(unsigned long pfn)
{
return some_hash(pfn) % NR_OF_SECTION_SLOTS;
}
This would, of course, still have limits on how _many_ sections can be
populated. But, it would remove the relationship on what the actual
physical address ranges can be from the number of populated sections.
Of course, it isn't quite that simple. You need to make sure that the
sparse code is clean from all connections between section number and
physical address, as well as handling things like hash collisions. We'd
probably also need to store the _actual_ physical address somewhere
because we can't get it from the section number any more.
But, Andy and I have talked about this kind of thing from the beginning
of sparsemem, so I hope the code is amenable to change like this.
-- Dave
P.S. With sparsemem extreme, I think you can cover an entire 64-bits of
address space with a 4GB top-level table. If one more level of tables
was added, we'd be down to (I think) an 8MB table. So, that might be an
option, too.
next prev parent reply other threads:[~2006-08-09 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m1irl4ftya.fsf@ebiederm.dsl.xmission.com>
[not found] ` <20060807194159.f7c741b5.akpm@osdl.org>
[not found] ` <17624.7310.856480.704542@cargo.ozlabs.ibm.com>
2006-08-08 5:14 ` [PATCH] x86_64: Make NR_IRQS configurable in Kconfig Andi Kleen
2006-08-08 8:17 ` Martin Schwidefsky
2006-08-09 17:58 ` Luck, Tony
2006-08-09 18:25 ` Dave Hansen [this message]
2006-08-10 12:55 ` Martin Schwidefsky
2006-08-10 14:40 ` Andy Whitcroft
2006-08-10 14:53 ` 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=1155147948.19249.171.camel@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=Natalie.Protasevich@unisys.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=ebiederm@xmission.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=rdunlap@xenotime.net \
--cc=schwidefsky@de.ibm.com \
--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