Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-15 Thread Minchan Kim
On Thu, Jul 15, 2010 at 5:49 AM, Russell King - ARM Linux 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 >> wrote: >> > On Wed, Jul 14, 2010 at 08:59:06AM +0900, Minchan Kim wrote: >> >> But I think Kukjin case's

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-14 Thread Russell King - ARM Linux
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 > 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. > >> Regardle

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-14 Thread Mel Gorman
On Wed, Jul 14, 2010 at 09:59:18AM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 13, 2010 at 09:32:50PM +0100, Mel Gorman wrote: > > On Tue, Jul 13, 2010 at 06:37:44PM +0100, Russell King - ARM Linux wrote: > > > You're saying that MAX_PHYSMEM_BITS=29 SECTION_SIZE_BITS=26 is wrong. > > > >

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-14 Thread Minchan Kim
On Wed, Jul 14, 2010 at 5:49 PM, Russell King - ARM Linux 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

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-14 Thread Russell King - ARM Linux
On Tue, Jul 13, 2010 at 09:32:50PM +0100, Mel Gorman wrote: > On Tue, Jul 13, 2010 at 06:37:44PM +0100, Russell King - ARM Linux wrote: > > You're saying that MAX_PHYSMEM_BITS=29 SECTION_SIZE_BITS=26 is wrong. > > > > Not wrong. It's fine as long as you're ok with some unnecessary memmap > being

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-14 Thread Russell King - ARM Linux
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? -- To unsubscribe fro

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Minchan Kim
Hi, Mel. On Wed, Jul 14, 2010 at 5:32 AM, Mel Gorman wrote: > On Tue, Jul 13, 2010 at 06:37:44PM +0100, Russell King - ARM Linux wrote: >> On Tue, Jul 13, 2010 at 10:50:35AM +0100, Mel Gorman wrote: >> > On Tue, Jul 13, 2010 at 10:38:15AM +0100, Russell King - ARM Linux wrote: >> > > On Tue, Jul

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Mel Gorman
On Tue, Jul 13, 2010 at 06:37:44PM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 13, 2010 at 10:50:35AM +0100, Mel Gorman wrote: > > On Tue, Jul 13, 2010 at 10:38:15AM +0100, Russell King - ARM Linux wrote: > > > On Tue, Jul 13, 2010 at 10:26:58AM +0100, Mel Gorman wrote: > > > > There is al

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Russell King - ARM Linux
On Tue, Jul 13, 2010 at 10:53:24AM +0900, KAMEZAWA Hiroyuki wrote: > yet another _very easy_ solution is, define pfn_valid() as following. We have a perfectly good and efficient pfn_valid() implementation which'll work no matter what memory model is chosen - we don't need to invent other solutions

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Russell King - ARM Linux
On Tue, Jul 13, 2010 at 10:50:35AM +0100, Mel Gorman wrote: > On Tue, Jul 13, 2010 at 10:38:15AM +0100, Russell King - ARM Linux wrote: > > On Tue, Jul 13, 2010 at 10:26:58AM +0100, Mel Gorman wrote: > > > There is also an assumption that a section is fully populated or empty. > > > > That is abso

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Mel Gorman
On Tue, Jul 13, 2010 at 10:38:15AM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 13, 2010 at 10:26:58AM +0100, Mel Gorman wrote: > > There is also an assumption that a section is fully populated or empty. > > That is absolutely absurd. Arguably, violating the memory model by punching unex

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Russell King - ARM Linux
On Tue, Jul 13, 2010 at 10:28:52AM +0100, Mel Gorman wrote: > I like this idea. It would allow memmap_valid_within to be thrown away > altogether and it maintains the assumptions of the memory model and > sounds "cheap". It can't work. We map kernel memory with 1MB sections, not pages. -- To unsu

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Russell King - ARM Linux
On Tue, Jul 13, 2010 at 10:26:58AM +0100, Mel Gorman wrote: > There is also an assumption that a section is fully populated or empty. That is absolutely absurd. So, I have a platform which has 256MB at 64MB intervals in 4 chunks. I can fit 512kB to any slot. It starts at 0x1000. Do I reall

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Mel Gorman
On Tue, Jul 13, 2010 at 12:03:15PM +0900, KAMEZAWA Hiroyuki wrote: > On Tue, 13 Jul 2010 11:05:26 +0900 > Minchan Kim wrote: > > > On Tue, Jul 13, 2010 at 9:25 AM, KAMEZAWA Hiroyuki > > wrote: > > > > For example, prepare a page filled with (1 << PG_reserved). > > > and replace it with unnecess

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-13 Thread Mel Gorman
On Mon, Jul 12, 2010 at 07:35:17PM +0900, Minchan Kim wrote: > >> On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > >> > Russell, > >> > > >> > Hi, > >> > > >> > Kukjin Kim wrote: > >> >> Russell wrote: > >> >> > So, memory starts at 0x2000 and finishes at 0x2500.  That's > >> >> > fin

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread KAMEZAWA Hiroyuki
On Tue, 13 Jul 2010 11:05:26 +0900 Minchan Kim wrote: > On Tue, Jul 13, 2010 at 9:25 AM, KAMEZAWA Hiroyuki > wrote: > > For example, prepare a page filled with (1 << PG_reserved). > > and replace it with unnecessary memmap rather than freeing a page for > > memmap. > > Hmm. I don't got your p

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Minchan Kim
On Tue, Jul 13, 2010 at 9:25 AM, KAMEZAWA Hiroyuki wrote: > On Mon, 12 Jul 2010 19:35:17 +0900 > Minchan Kim wrote: > >> Hi, Mel and Kame. >> >> On Mon, Jul 12, 2010 at 7:13 PM, Kukjin Kim wrote: >> > Minchan Kim wrote: >> >> >> >> Hello. >> >> >> > Hello :-) >> > >> >> On Mon, Jul 12, 2010 at 5

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread KAMEZAWA Hiroyuki
On Tue, 13 Jul 2010 09:25:22 +0900 KAMEZAWA Hiroyuki wrote: > On Mon, 12 Jul 2010 19:35:17 +0900 > Minchan Kim wrote: > > > Hi, Mel and Kame. > > > > On Mon, Jul 12, 2010 at 7:13 PM, Kukjin Kim wrote: > > > Minchan Kim wrote: > > >> > > >> Hello. > > >> > > > Hello :-) > > > > > >> On Mon, Ju

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread KAMEZAWA Hiroyuki
On Mon, 12 Jul 2010 19:35:17 +0900 Minchan Kim wrote: > Hi, Mel and Kame. > > On Mon, Jul 12, 2010 at 7:13 PM, Kukjin Kim wrote: > > Minchan Kim wrote: > >> > >> Hello. > >> > > Hello :-) > > > >> On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > >> > Russell, > >> > > >> > Hi, > >> > > >>

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Russell King - ARM Linux
On Mon, Jul 12, 2010 at 09:28:16PM +0900, Minchan Kim wrote: > It just checks that there is a section and section_mem_map has > SECTION_HAS_MEM_MAP. > The first section in above case has just 80M memory but section has 256M. > So, 0x2500 - 2800 is the hole. If you pass pfn whihc is 0x2500

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Minchan Kim
On Mon, Jul 12, 2010 at 11:45:41AM +0100, Russell King - ARM Linux wrote: > On Mon, Jul 12, 2010 at 06:52:28PM +0900, Minchan Kim wrote: > > Hello. > > > > On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > > > Russell, > > > > > > Hi, > > > > > > Kukjin Kim wrote: > > >> Russell wrote: > > >>

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Russell King - ARM Linux
On Mon, Jul 12, 2010 at 06:52:28PM +0900, Minchan Kim wrote: > Hello. > > On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > > Russell, > > > > Hi, > > > > Kukjin Kim wrote: > >> Russell wrote: > >> > So, memory starts at 0x2000 and finishes at 0x2500.  That's > > fine. > >> > That does

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Minchan Kim
Hi, Mel and Kame. On Mon, Jul 12, 2010 at 7:13 PM, Kukjin Kim wrote: > Minchan Kim wrote: >> >> Hello. >> > Hello :-) > >> On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: >> > Russell, >> > >> > Hi, >> > >> > Kukjin Kim wrote: >> >> Russell wrote: >> >> > So, memory starts at 0x2000 and f

RE: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kukjin Kim
Minchan Kim wrote: > > Hello. > Hello :-) > On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > > Russell, > > > > Hi, > > > > Kukjin Kim wrote: > >> Russell wrote: > >> > So, memory starts at 0x2000 and finishes at 0x2500.  That's > > fine. > >> > That doesn't mean the section size is

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Russell King - ARM Linux
On Mon, Jul 12, 2010 at 07:08:11PM +0900, Kyungmin Park wrote: > 27 for our board. 28 for generic. > > Note that I enabled HIGHMEM and modify the VMALLOC_END to 0xd000' > to test HIGHMEM. If you want to test HIGHMEM, the way to do it is to specify a vmalloc= parameter to the kernel, not to mo

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kyungmin Park
On Mon, Jul 12, 2010 at 6:58 PM, Kukjin Kim wrote: > Kyungmin Park wrote: > >> >> Interesting. >> >> I got tested with >> #define MAX_PHYSMEM_BITS        31 >> #define SECTION_SIZE_BITS       27 >> >> # cat /proc/sys/vm/min_free_kbytes >> 1832 >> # echo 1828 > /proc/sys/vm/min_free_kbytes >> # cat

RE: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kukjin Kim
Kyungmin Park wrote: > > Interesting. > > I got tested with > #define MAX_PHYSMEM_BITS31 > #define SECTION_SIZE_BITS 27 > > # cat /proc/sys/vm/min_free_kbytes > 1832 > # echo 1828 > /proc/sys/vm/min_free_kbytes > # cat /proc/sys/vm/min_free_kbytes > 1828 > # echo 1820 > /proc/sys/

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Minchan Kim
Hello. On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim wrote: > Russell, > > Hi, > > Kukjin Kim wrote: >> Russell wrote: >> > So, memory starts at 0x2000 and finishes at 0x2500.  That's > fine. >> > That doesn't mean the section size is 16MB. >> > >> > As I've already said, the section size h

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kyungmin Park
Interesting. I got tested with #define MAX_PHYSMEM_BITS31 #define SECTION_SIZE_BITS 27 # cat /proc/sys/vm/min_free_kbytes 1832 # echo 1828 > /proc/sys/vm/min_free_kbytes # cat /proc/sys/vm/min_free_kbytes 1828 # echo 1820 > /proc/sys/vm/min_free_kbytes # cat /proc/sys/vm/min_free_kb

About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kukjin Kim
Russell, Hi, Kukjin Kim wrote: > Russell wrote: > > So, memory starts at 0x2000 and finishes at 0x2500. That's fine. > > That doesn't mean the section size is 16MB. > > > > As I've already said, the section size has _nothing_ what so ever to do > > with the size of memory, or the granul