lkml.org 
[lkml]   [2002]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [lkcd-devel] Re: What's left over.
    From
    Date
    Linus Torvalds <torvalds@transmeta.com> writes:

    > >From a sanity standpoint, I think the thing already _has_ a system call,
    > though: clearly "sys_reboot()" is the place to add a case for "reboot into
    > this image". No? That's where we shut down devices anyway, and it's the
    > sane place to say "reboot into the kexec image"

    When kexec is separated into two pieces I agree. As I had it
    initially in one step it does not look at all like reboot. Now I
    just need to think up a new magic number for sys_reboot.

    [snip wonderful vision of the theoretical simplicity of sys_kexec].

    In case I was not sufficiently clear last night. It could be as
    simple as your example code if I replaced vmalloc by
    __get_free_pages/alloc_pages, and allocated a large contiguous area of
    ram. But MAX_ORDER limits me to 8MB images, and allocating an 8MB
    chunk is unreliable, and even a 2MB chunk is dangerous.

    So I must use some form of scatter/gather list of pages, like
    area ->pages[] to make it work. Things get tricky because I gather
    (via memcpy) the pages at a location that potentially overlaps the
    source pages. So I must walk through the list of pages making certain
    I when I gather (memcpy) the buffer pages into their final location I
    will not stomp on a buffer page I have not come to yet. Correctly
    doing that untangling is where the complexity in kernel/kexec.c comes
    from.

    Eric

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:30    [W:2.555 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site