[lkml]   [2001]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [RFC] bootmem for 2.5
    On Mon, Nov 05, 2001 at 10:23:45PM -0500, Robert Love wrote:
    > The patch is without problem on 2.4.13-ac7. Free memory increased by
    > about 100K: free and dmesg both confirm 384292k vs 384196k. This is a
    > P3-733 on an i815 with 384MB. Very nice.
    > Note that the patch and UP-APIC do not get along. Some quick debugging
    > with William found the cause. APIC does indeed touch bootmem. The
    > above is thus obviously with CONFIG_X86_UP_APIC unset.
    > Robert Love

    I've managed to reproduce the problem, and I heard from you elsewhere
    that you've verified the fix (although it appeared to reduce the memory
    savings to 4KB).

    start_segment_treap() is a macro (operating largely on the same
    principle as list_entry()) which converts a treap_node_t * to a struct *
    given the field and struct name by computing offsets and casting. The
    casting renders this somewhat less than type safe, and the patch below
    corrects a type error I committed in calling it (the start_tree field
    is already of type treap_node_t *).

    Thanks again,

    diff -urN linux-broken/mm/bootmem.c linux-bootmem/mm/bootmem.c
    --- linux-broken/mm/bootmem.c Wed Nov 7 16:31:37 2001
    +++ linux-bootmem/mm/bootmem.c Wed Nov 7 16:31:09 2001
    @@ -860,7 +860,7 @@
    while(pgdat) {
    unsigned in_node;

    - tree = start_segment_treap(&pgdat->bdata->segment_tree.start_tree);
    + tree = start_segment_treap(pgdat->bdata->segment_tree.start_tree);
    in_node = segment_tree_intersects(tree, &segment);
    in_any_node |= in_node;

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2005-03-22 13:12    [W:0.024 / U:17.152 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site