lkml.org 
[lkml]   [2009]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [Patch 8/8] kexec: allow to shrink reserved memory
    On Fri, Aug 21, 2009 at 09:34:52AM +0900, KAMEZAWA Hiroyuki wrote:
    >On Thu, 20 Aug 2009 17:15:56 +0800
    >Amerigo Wang <amwang@redhat.com> wrote:
    >
    >> > 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 ?
    >> >
    >>
    >> Hi,
    >>
    >> It looks like that mem_map has 'struct page' for the reserved memory, I
    >> checked my "early_node_map[] active PFN ranges" output, the reserved
    >> memory area for crash kernel is right in one range. Am I missing
    >> something here?
    >>
    >> I don't know why that oops comes out, maybe because of no PTE for thoese
    >> pages?
    >>
    >Hmm ? Could you show me the code you use ?

    (Sorry that I reply to you with my gmail, my work email can't send out
    this message, probably because one of the destinations is broken...
    I am the same person, don't be confused. :-)

    Sure. Below is it:

    + for (addr = end + 1; addr < crashk_res.end; addr += PAGE_SIZE) {
    + printk(KERN_DEBUG "PFN is valid? %d\n", pfn_valid(addr>>PAGE_SHIFT));
    + ClearPageReserved(virt_to_page(addr));
    + init_page_count(virt_to_page(addr));
    + free_page(addr);
    + totalram_pages++;
    + }


    pfn_valid() returns 1, and oops happens at ClearPageReserved().
    ('addr' is right between crashk_res.start and crashk_res.end)

    Thank you!


    \
     
     \ /
      Last update: 2009-08-21 03:59    [W:4.329 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site