l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mechanism to request physical memory with certain properties, new al


From: Neal H. Walfield
Subject: Re: Mechanism to request physical memory with certain properties, new algorithm
Date: Wed, 01 Jun 2005 18:37:34 +0100
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

Minus some typos in your pseudo code, this approach looks good.  A few
of comments.

We need to remember the constraints under which memory is allocated so
that should an allocation with a tighter constraint be requested, we
can relocate--should we choose--the old memory.

As a corollary, some memory can't be moved: e.g. memory which is being
used for DMA.

We need to evenly distribute allocations across physical memory.  In
this way, we avoid flooding interesting zones (i.e. the set of frames
which satisfies a common constraint e.g. memory which can be used for
DMA and memory of a particular color) and hence reduce the amount of
relocation when there is little free memory.  We could set priorities
for different memory zones but that is complicated.  Simply having a
counter in find_node and incrementing and checking the least
significant bit each time we are about to do an unconstrained recurse
to a left or right node should offer a reasonable distribution.

Finally, there should be a way to make constraints weak.  That is, the
provided constraints represent a preference (e.g. for a memory color)
but not a hard requirement.

Thanks,
Neal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]