Re: New kernel/resource.c

The Doctor What (docwhat@gerf.org)
Mon, 19 Jul 1999 11:55:51 -0500


On Sat, Jul 17, 1999 at 01:34:01PM -0400, allbery@kf8nh.apk.net wrote:
> On 17 Jul, Linus Torvalds wrote
> +-----
> | I'd be more convinced if you could show (for example) that you can
> | actually simplify "vmalloc()" by using this to find empty holes. Or
> | something like that.
> +--->8
>
> I'm not sure about the general case, but contemplate this:
>
> What I'm envisioning is a resource tree which can describe a simple
> flat address space, a flat address space with some "special" memory
> (i.e. ISA DMA-able space on PCs), or a NUMA setup, etc.. vmalloc()
> would become a compatibility wrapper for a more general alloc_space()
> call which would be passed a tree node: if you don't really care which
> pool the memory comes from you can pass a "higher" resource tree node,
> if you need the memory on the E63xx's local CPU RAM or an ISA DMA-able
> region, etc. you pass the resource node for that resource. There might
> also be an option for "prefer closer resources" vs. "use whatever is
> most readily available" (i.e. "prefer speed" vs. "prefer size", or maybe
> "prefer resource speed" vs. "prefer allocation speed"?). Same goes for
> resources other than memory.
>
> In theory a node in the resource tree might include pointers to
> allocation management functions, which could be inherited from higher
> nodes when there's no need for special handling --- or the node's
> allocation functions could refer to the parent's allocation functions
> (like calling a superclass's method in a subclass method) when it needs
> to modify the allocation scheme instead of overriding it.
>
> Does this make any sense, or am I babbling (again)?

It almost sounds like you want to have the memory blocked out into
different speeds. Sort of like Metric for routing networks. This makes
some sense, as I know some hardware has different speed memory (I think
the Amiga does), but I'm not sure you'd want to keep such a table of info,
or how to keep track of these speeds if memory has, for example, different
speeds dependent on which CPU you are looking from.

Ciao!

-- 
"When you have to shoot, shoot! Don't talk."
		--Tuco (The Good, The Bad, and The Ugly)

The Doctor What: A Holtje Production http://www.gerf.org/~docwhat/ docwhat@gerf.org (finger docwhat@gerf.org for PGP key) KF6VNC

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