l4-hurd
[Top][All Lists]
Advanced

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

making paging decisions


From: Marcus Brinkmann
Subject: making paging decisions
Date: Tue, 26 Oct 2004 02:19:50 +0200
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)

Hi,

in Prague, I spent some time with Pavel Pisa, who had some comments on
the memory management design.  The main issue he expressed his
concerns about is which strategy physmem should chose to ask back for
frames.  He said that from his experience, it is crucial to have some
form of global view on the memory frames, and to be able to attach
some values with them, like priority or cost of recovering the frame,
so smart decisions can be made.

Of course, our basic model is that we leave these decisions to the
tasks themselves, which only have a local view.  In fact, we can not
even trust any information provided by an untrusted user.  A user
would be likely to just lie about the priority and involved costs, to
inflate the price and avoid being asked back for memory.

But, there are things we can do.  First, it would be interesting to
allow users to use one memory manager (or meta-manager) to manage the
memory for all its tasks.  This would at least allow to take into
account differences between a user's task.  That wouldn't be quite
good enough, though.  I don't know enough to judge if it would be a
real advantage at all.

Second, we can let tasks voluntarily de-value their memory.  This
would work like nice(), and be completely voluntary.  Not many would
use it.

Third, tasks could announce their priorities and costs to physmem.
Now, there must be a way to avoid inflation.  That way is to give
tasks a benefit in return for not announcing high priorities and high
costs.  This is basically the market-model idea, where tasks compete
in using the memory, and some price is attached to memory.  We only
have vague ideas on how to actually use it.  But the idea is that
tasks would have an incentive to be modest about their claims to
physmem, so that the priority and cost information is actually useful
to make decisions about claiming back memory pages.  Physmem could
then use that info, and any internal information that is available, to
make moderatley smart requests to reclaim memory.

This sumary is necessarily vague, because we don't have any good plans
about this yet.  But a market model could very well be the basis, also
for example to allow fine-tuning the system further: Some tasks could
get more initial "cash" and thus run at a higher "memory priority".  Etc.

Much more work needed here.  This just so that my discussion with
Pavel gets recorded, and people start to think about it.

Thanks,
Marcus







reply via email to

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