Re: [1/8,v3] NUMA Hotplug Emulator: add function to hide memory region via e820 table.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 20, 2010 at 04:45:06PM -0800, David Rientjes wrote:
>On Fri, 19 Nov 2010, Shaohui Zheng wrote:
>
>> > > > > Index: linux-hpe4/arch/x86/kernel/e820.c
>> > > > > ===================================================================
>> > > > > --- linux-hpe4.orig/arch/x86/kernel/e820.c	2010-11-15 17:13:02.483461667 +0800
>> > > > > +++ linux-hpe4/arch/x86/kernel/e820.c	2010-11-15 17:13:07.083461581 +0800
>> > > > > @@ -971,6 +971,7 @@
>> > > > >  }
>> > > > >  
>> > > > >  static int userdef __initdata;
>> > > > > +static u64 max_mem_size __initdata = ULLONG_MAX;
>> > > > >  
>> > > > >  /* "mem=nopentium" disables the 4MB page tables. */
>> > > > >  static int __init parse_memopt(char *p)
>> > > > > @@ -989,12 +990,28 @@
>> > > > >  
>> > > > >  	userdef = 1;
>> > > > >  	mem_size = memparse(p, &p);
>> > > > > -	e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
>> > > > > +	e820_remove_range(mem_size, max_mem_size - mem_size, E820_RAM, 1);
>> > > > > +	max_mem_size = mem_size;
>> > > > >  
>> > > > >  	return 0;
>> > > > >  }
>> > > > 
>> > > > This needs memmap= support as well, right?
>> > > we did not do the testing after combine both memmap and numa=hide paramter, 
>> > > I think that the result should similar with mem=XX, they both remove a memory
>> > > region from the e820 table.
>> > > 
>> > 
>> > You've modified the parser for mem= but not memmap= so the change needs 
>> > additional support for the latter.
>> > 
>> 
>> the parser for mem= is not modified, the changed parser is numa=, I add a addtional
>> option numa=hide=.
>> 
>
>The above hunk is modifying the x86 parser for the mem= parameter.
>

That is fine as long as "mem=" is parsed before "numa=".

I think "mem=" should always be parsed before "numa=" no matter what
order they are specified in cmdline, since we need know how much total
memory we have at first.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]