All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>, Kukjin Kim <kgene.kim@samsung.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org
Subject: Re: About SECTION_SIZE_BITS for Sparsemem
Date: Wed, 14 Jul 2010 21:49:52 +0100	[thread overview]
Message-ID: <20100714204952.GD18138@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTilrLJb97NkK4Q-Oan_ufXRdafIw7n6060mItaXj@mail.gmail.com>

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>.

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: About SECTION_SIZE_BITS for Sparsemem
Date: Wed, 14 Jul 2010 21:49:52 +0100	[thread overview]
Message-ID: <20100714204952.GD18138@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTilrLJb97NkK4Q-Oan_ufXRdafIw7n6060mItaXj@mail.gmail.com>

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>.

  reply	other threads:[~2010-07-14 20:50 UTC|newest]

Thread overview: 60+ 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  8:32 ` Kukjin Kim
2010-07-12  9:35 ` Kyungmin Park
2010-07-12  9:35   ` Kyungmin Park
2010-07-12  9:58   ` Kukjin Kim
2010-07-12  9:58     ` Kukjin Kim
2010-07-12 10:08     ` Kyungmin Park
2010-07-12 10:08       ` Kyungmin Park
2010-07-12 10:13       ` Russell King - ARM Linux
2010-07-12 10:13         ` Russell King - ARM Linux
2010-07-12  9:52 ` Minchan Kim
2010-07-12  9:52   ` Minchan Kim
2010-07-12 10:13   ` Kukjin Kim
2010-07-12 10:13     ` Kukjin Kim
2010-07-12 10:35     ` Minchan Kim
2010-07-12 10:35       ` Minchan Kim
2010-07-13  0:25       ` KAMEZAWA Hiroyuki
2010-07-13  0:25         ` KAMEZAWA Hiroyuki
2010-07-13  1:53         ` KAMEZAWA Hiroyuki
2010-07-13  1:53           ` KAMEZAWA Hiroyuki
2010-07-13 18:31           ` Russell King - ARM Linux
2010-07-13 18:31             ` Russell King - ARM Linux
2010-07-13  2:05         ` Minchan Kim
2010-07-13  2:05           ` Minchan Kim
2010-07-13  3:03           ` KAMEZAWA Hiroyuki
2010-07-13  3:03             ` KAMEZAWA Hiroyuki
2010-07-13  9:28             ` Mel Gorman
2010-07-13  9:28               ` Mel Gorman
2010-07-13  9:38               ` Russell King - ARM Linux
2010-07-13  9:38                 ` Russell King - ARM Linux
2010-07-13  9:26       ` Mel Gorman
2010-07-13  9:26         ` Mel Gorman
2010-07-13  9:38         ` Russell King - ARM Linux
2010-07-13  9:38           ` Russell King - ARM Linux
2010-07-13  9:50           ` Mel Gorman
2010-07-13  9:50             ` Mel Gorman
2010-07-13 17:37             ` Russell King - ARM Linux
2010-07-13 17:37               ` Russell King - ARM Linux
2010-07-13 20:32               ` Mel Gorman
2010-07-13 20:32                 ` Mel Gorman
2010-07-13 23:59                 ` Minchan Kim
2010-07-13 23:59                   ` Minchan Kim
2010-07-14  8:49                   ` Russell King - ARM Linux
2010-07-14  8:49                     ` Russell King - ARM Linux
2010-07-14 11:04                     ` Minchan Kim
2010-07-14 11:04                       ` Minchan Kim
2010-07-14 20:49                       ` Russell King - ARM Linux [this message]
2010-07-14 20:49                         ` Russell King - ARM Linux
2010-07-16  0:07                         ` Minchan Kim
2010-07-16  0:07                           ` Minchan Kim
2010-07-14  8:59                 ` Russell King - ARM Linux
2010-07-14  8:59                   ` Russell King - ARM Linux
2010-07-14 13:14                   ` Mel Gorman
2010-07-14 13:14                     ` Mel Gorman
2010-07-12 10:45   ` Russell King - ARM Linux
2010-07-12 10:45     ` Russell King - ARM Linux
2010-07-12 12:28     ` Minchan Kim
2010-07-12 12:28       ` Minchan Kim
2010-07-12 12:42       ` Russell King - ARM Linux
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=20100714204952.GD18138@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=ben-linux@fluff.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.