[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061218221534.GB25472@infradead.org>
Date: Mon, 18 Dec 2006 22:15:34 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Dave Hansen <haveblue@...ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Andrew Morton <akpm@...l.org>, apw@...dowen.org,
cbe-oss-dev@...abs.org, linuxppc-dev@...abs.org,
linux-mm@...ck.org, mkravetz@...ibm.com, hch@...radead.org,
jk@...abs.org, linux-kernel@...r.kernel.org, paulus@...ba.org,
benh@...nel.crashing.org, gone@...ibm.com, kmannth@...ibm.com
Subject: Re: [PATCH] Fix sparsemem on Cell
On Mon, Dec 18, 2006 at 01:13:57PM -0800, Dave Hansen wrote:
> On Sat, 2006-12-16 at 17:03 +0900, KAMEZAWA Hiroyuki wrote:
> > /* add this memory to iomem resource */
> > static struct resource *register_memory_resource(u64 start, u64 size)
> > {
> > @@ -273,10 +284,13 @@
> > if (ret)
> > goto error;
> > }
> > + atomic_inc(&memory_hotadd_count);
> >
> > /* call arch's memory hotadd */
> > ret = arch_add_memory(nid, start, size);
> >
> > + atomic_dec(&memory_hotadd_count);
>
> I'd be willing to be that this will work just fine. But, I think we can
> do it without any static state at all, if we just pass a runtime-or-not
> flag down into the arch_add_memory() call chain.
>
> I'll code that up so we can compare to yours.
Yes, I stronly concur that passing an explicit flag is much much better
than any hack involving global state.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists