[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Memory Allocators
On Tue, Dec 7, 2010 at 5:33 PM, David Young <dyoung%pobox.com@localhost> wrote:
> On Mon, Dec 06, 2010 at 11:42:27AM +0100, Lars Heidieker wrote:
>> To whom it may be of concern,
>> I just got my thoughts around the different memory allocators in the
>> NetBSDs kernel. It seems to me that there is quite a lot of
>> duplication and some clean up would be needed.
>> I think it would be nice to get rid of the old malloc. the kmem/vmem
>> could be used in such a case but this brings me to another point, the
>> vmem is designed to slice integer spaces eg addresses or whatever,
>> therefor it would be suited to slice the kernels virtual address space
>> like in solaris but this is only the case for the kmem not for the
>> pool memory and furthermore the allocation of virtual address space
>> for kemm/vmem is backed by the uvm_kern/uvm_map system as well, seems
>> like some duplication to me.
>> Either a solution which uses the vmem to slice the kernel space and
>> not using the uvm_kern/uvm_map stuff for that or backing the pool/kmem
>> with the uvm_kern/uvm_map system would be feasible. I do prefer the
>> later solution as getting the recursion in vmem right is quite hard
>> and to use vmem as a replacement for extend.
> I tried to replace extent(9) with vmem(9) in the kernel, and I found
> some bugs in the vmem(9) API & implementation. I discussed my results
> at <http://mail-index.netbsd.org/tech-kern/2009/12/03/msg006566.html>.
> Maybe you would like to pick up from where I left off?
> David Young OJC Technologies
> dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933
I did some further investigations. I think the real solution would be
to complete the vmem implementation and to replace the kmem maps with
Or if the other way around then kmem shouldn't be based on vmem it
should be based on uvm_km* directly.
Die mystischen Erklärungen gelten für tief;
die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind.
-- Friedrich Nietzsche
[ Die Fröhliche Wissenschaft Buch 3, 126 ]
Main Index |
Thread Index |