From: minchan.kim@gmail.com (Minchan Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: About SECTION_SIZE_BITS for Sparsemem
Date: Fri, 16 Jul 2010 09:07:59 +0900 [thread overview]
Message-ID: <AANLkTilpGchoSYd6h_fnACkQCX_c5I3AH679fHbL5_im@mail.gmail.com> (raw)
In-Reply-To: <20100714204952.GD18138@n2100.arm.linux.org.uk>
On Thu, Jul 15, 2010 at 5:49 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Jul 14, 2010 at 08:04:07PM +0900, Minchan Kim wrote:
>> On Wed, Jul 14, 2010 at 5:49 PM, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>> > On Wed, Jul 14, 2010 at 08:59:06AM +0900, Minchan Kim wrote:
>> >> But I think Kukjin case's best solution is to make section size 16M, not 256M.
>> >> Regardless of this, Your idea is the direction we should proceed, I think.
>> >
>> > So what if someone decides to fit 8MB DRAMs to the board?
>> >
>>
>> Hmm. It might be a problem.
>> Should we consider all configuration?
>>
>> Then, in below cases ram size never can change?
>> How does it acked and merged?
>> I don't know below board can't configurable ram size. Just out of curiosity.
>
> All of these, SECTION_SIZE_BITS refers to the _spacing_ of memory, not
> the minimum size of DRAM which can ever be fitted.
>
> Reducing SECTION_SIZE_BITS is really not an option for some of these
> platforms - just look at where memory starts in physical space:
>
> arch/arm/mach-clps711x/include/mach/memory.h:#define PHYS_OFFSET UL(0xc0000000)
> arch/arm/mach-clps711x/include/mach/memory.h:#define SECTION_SIZE_BITS ?24
> arch/arm/mach-lh7a40x/include/mach/memory.h:#define PHYS_OFFSET UL(0xc0000000)
> arch/arm/mach-lh7a40x/include/mach/memory.h:#define SECTION_SIZE_BITS ? 24
> arch/arm/mach-realview/include/mach/memory.h:#define PHYS_OFFSET UL(0x70000000)
> arch/arm/mach-realview/include/mach/memory.h:#define SECTION_SIZE_BITS ?28
> arch/arm/mach-realview/include/mach/memory.h:#define PHYS_OFFSET UL(0x00000000)
> arch/arm/mach-rpc/include/mach/memory.h:#define PHYS_OFFSET UL(0x10000000)
> arch/arm/mach-rpc/include/mach/memory.h:#define SECTION_SIZE_BITS ? ? ? 26
> arch/arm/mach-s5pv210/include/mach/memory.h:#define PHYS_OFFSET UL(0x20000000)
> arch/arm/mach-s5pv210/include/mach/memory.h:#define SECTION_SIZE_BITS ? 28
> arch/arm/mach-sa1100/include/mach/memory.h:#define PHYS_OFFSET UL(0xc0000000)
> arch/arm/mach-sa1100/include/mach/memory.h:#define SECTION_SIZE_BITS ? ?27
>
> If physical memory starts at 3GB, with SECTION_SIZE_BITS set at 24,
> there's 256 sections already. ?Reducing SECTION_SIZE_BITS to the multiple
> of RAM size will increase the number of sections to many thousands.
> Clearly, sparsemem doesn't handle sparse memory very well, and is
> defficient.
>
> I don't know what the answer is to this; I'm totally fed up with being
> pushed into using things, and then later down the line being told that
> its all wrong and shouldn't be used like we are. ?Maybe we should just
> delete these sub-architectures which use sparsemem and say to people
> that the kernel just doesn't support their memory layouts.
>
> <depressed>.
>
Sorry for late response.
Okay. I think Kame's recent solution is a good.
http://www.spinics.net/lists/linux-mm/msg06594.html
It doesn't need overriding pfn_valid, doesn't need more space.
And we can optimize it with overriding SECTION_MAP_LAST_BIT with
SECTION_MAP_HAS_HOLE to avoid non-hole section overhead.
If we all agree, I will make the patch.
All agree?
--
Kind regards,
Minchan Kim
next prev parent reply other threads:[~2010-07-16 0:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 8:32 About SECTION_SIZE_BITS for Sparsemem Kukjin Kim
2010-07-12 9:35 ` Kyungmin Park
2010-07-12 9:58 ` Kukjin Kim
2010-07-12 10:08 ` Kyungmin Park
2010-07-12 10:13 ` Russell King - ARM Linux
2010-07-12 9:52 ` Minchan Kim
2010-07-12 10:13 ` Kukjin Kim
2010-07-12 10:35 ` Minchan Kim
2010-07-13 0:25 ` KAMEZAWA Hiroyuki
2010-07-13 1:53 ` KAMEZAWA Hiroyuki
2010-07-13 18:31 ` Russell King - ARM Linux
2010-07-13 2:05 ` Minchan Kim
2010-07-13 3:03 ` KAMEZAWA Hiroyuki
2010-07-13 9:28 ` Mel Gorman
2010-07-13 9:38 ` Russell King - ARM Linux
2010-07-13 9:26 ` Mel Gorman
2010-07-13 9:38 ` Russell King - ARM Linux
2010-07-13 9:50 ` Mel Gorman
2010-07-13 17:37 ` Russell King - ARM Linux
2010-07-13 20:32 ` Mel Gorman
2010-07-13 23:59 ` Minchan Kim
2010-07-14 8:49 ` Russell King - ARM Linux
2010-07-14 11:04 ` Minchan Kim
2010-07-14 20:49 ` Russell King - ARM Linux
2010-07-16 0:07 ` Minchan Kim [this message]
2010-07-14 8:59 ` Russell King - ARM Linux
2010-07-14 13:14 ` Mel Gorman
2010-07-12 10:45 ` Russell King - ARM Linux
2010-07-12 12:28 ` Minchan Kim
2010-07-12 12:42 ` Russell King - ARM Linux
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=AANLkTilpGchoSYd6h_fnACkQCX_c5I3AH679fHbL5_im@mail.gmail.com \
--to=minchan.kim@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).