lkml.org 
[lkml]   [2006]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] memory hotadd fixes [6/5] enhance collistion check
    From
    Date
    On Fri, 2006-08-04 at 11:32 +0900, KAMEZAWA Hiroyuki wrote:
    > Okay... here is 6/5 patch..
    >
    > On Fri, 4 Aug 2006 11:15:50 +0900
    > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
    > > > > Maybe moving ioresouce collision check in early stage of add_memory() is good ?
    > > > Yea. I am working a a full patch set for but my sparsemem and reserve
    > > > add-based paths. It creates a valid_memory_add_range call at the start
    > > > of add_memory. I should be posting the set in the next few hours.
    > > >
    > > Ah..ok. but I wrote my own patch...and testing it now..
    > >
    >
    > This patch passed test with ia64. based on 5 patches already sent.
    > plz check.

    <snip>
    > pg_data_t *pgdat = NULL;
    > int new_pgdat = 0;
    > + struct resource *res;
    > int ret;
    >
    > + res = register_memory_resource(start, size);
    > + if (!res)
    > + return -EEXIST;
    > +
    > if (!node_online(nid)) {
    > pgdat = hotadd_new_pgdat(nid, start);
    > if (!pgdat)
    > @@ -277,14 +293,13 @@
    > BUG_ON(ret);
    > }
    >
    > - /* register this memory as resource */
    > - ret = register_memory_resource(start, size);
    > -
    > return ret;
    > error:
    > /* rollback pgdat allocation and others */
    > if (new_pgdat)
    > rollback_node_hotadd(nid, pgdat);
    > + if (res)
    > + release_memory_resource(res);
    >


    I am trying to keep add_memory non-sparsemem specific. With reserve
    memory the memory is already present and so using
    register_memory_resource as a key to find out if it is already present
    won't work.

    I can build ontop of this if you want me to. I would like to test this
    to make sure it works for me. (I will do this sometime today)


    Thanks,
    Keith

    -
    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: 2006-08-04 05:13    [W:0.033 / U:0.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site