Re: New kernel/resource.c

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sat, 17 Jul 1999 09:55:53 +0200 (MEST)


Linus Torvalds wrote:
> > Kernel virtual adressing space:
> > 0x00000000 - 0xc0000000 Current user process.
> > 0xc0000000 - 0xc00a0000 main memory, below 640k
> > 0xc00a0000 - 0xc0100000 ISA io memory.
> > 0xc0100000 - 0xc4000000 main memory, above 1Mb (*)
> > 0xc4800000 - 0xc8800000 available for ioremap and vmalloc. (*)
>
> Sure.
>
> I don't see all that strong a need for it, but the above is certainly not
> wrong, and it _could_ be useful. Do you have any real application in mind,
> or do you just want to visualize the current vmallocs in /proc?
>
> So yes, a resource tree like you propose definitely makes sense. I just
> don't want to implement (or accept patches) purely on "makes sense": I
> really would like to see a real use of it too. Convince me.

Resource management is about managing (scarce) resources. Virtual
memory is scarce. And me confusing virtual and physical memory for a
moment prompted me to make this suggestion.

Reasons that I can come up with right now:
- It has an educational effect. (It tells people where their 3G kernel
virtual addressing space went, it explains why you should use mem=960M
instead of mem=1024M if you have 1G of RAM.)
- ioremap & vmalloc are parcelling out a resource, that nicely fits the
model.

We, in effect, have two special purpose allocators that allocate from
this resource, and we've statically allocated their domains. I don't
think that there is a pressing argument to say that we "need" this
right now, but it would be nice to make things fit into the "scheme of
things".

Not convinced? Oh well, at least you straightened me out.... ;-)

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

- 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/