Thread (16 messages) 16 messages, 4 authors, 2009-08-21

Re: [Patch 8/8] kexec: allow to shrink reserved memory

From: Amerigo Wang <hidden>
Date: 2009-08-19 10:46:06
Also in: lkml

KAMEZAWA Hiroyuki wrote:
On Wed, 19 Aug 2009 10:41:13 +0800
Amerigo Wang [off-list ref] wrote:

  
quoted
KAMEZAWA Hiroyuki wrote:
    
quoted
On Tue, 18 Aug 2009 18:35:32 +0800
Amerigo Wang [off-list ref] wrote:

  
      
quoted
KAMEZAWA Hiroyuki wrote:
    
        
quoted
On Tue, 18 Aug 2009 14:31:23 +0800
Amerigo Wang [off-list ref] wrote:
  
      
          
quoted
quoted
    It's hidden from the system before mem_init() ?
  
      
          
              
Not sure, but probably yes. It is reserved in setup_arch() which is 
before mm_init() which calls mem_init().

Do you have any advice to free that reserved memory after boot? :)

    
        
            
Let's see arch/x86/mm/init.c::free_initmem()

Maybe it's all you want.

	- ClearPageReserved()
	- init_page_count()
	- free_page()
	- totalram_pages++
  
      
          
Just FYI: calling ClearPageReserved() caused an oops: "Unable to handle 
paging request".

I am trying to figure out why...

    
        
Hmm...then....memmap is not there.
pfn_valid() check will help you. What arch ? x86-64 ?
  
      
Hmm, yes, x86_64, but this code is arch-independent, I mean it should 
work or not work on all arch, no?

So I am afraid we need to use other API to free it...

    
The, problem is whether memmap is there or not. That's all.
plz see init sequence and check there are memmap.
If memory-for-crash is obtained via bootmem,
Don't you try to free memory hole ?
  
Yes, I am checking the code. Thanks!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help