[Cbe-oss-dev] [Lhms-devel] Re: [RFC] spufs: memory-add fix for CONFIG_NUMA

Dave Hansen haveblue at us.ibm.com
Wed Apr 12 07:58:12 EST 2006


On Tue, 2006-04-11 at 23:48 +0200, Arnd Bergmann wrote:
> So for simplicity, the idea is to always add a full section
> to mem_map whenever we need to add a few pages for one SPE,
> and then ignore that if it was already there. 

OK. 

How about we poison the unused mem_map[] pages in  the areas of the
section which aren't full?

That way, we can keep track in case any goofballs try to add the same
memory a couple of times, or try to remove memory that wasn't there.

What I want to make sure is that we have matching add and remove memory
operations.  Let's say a section size is 100, and you do:

	add_memory(0, 10);
	add_memory(90, 100);

I want to make sure that anybody doing

	remove_memory(0, 100);

or

	add_memory(0, 100);

will properly error out, and not silently or accidentally blow away
somebody else's mem_map[].

-- Dave




More information about the cbe-oss-dev mailing list