Naive question about grant/map
esk at ira.uka.de
Fri Dec 5 11:30:10 CET 2003
[Jonathan S Shapiro]
> I am looking for a sequence in which A maps to B and B ??? to C and
> the result would look like:
> A -> B
> A -> C
> Is there such an operation?
> Also, I forgot to ask: is there some reason why such an operation
> would be inadvisable?
Conceptually, no. The only problem is that I don't see any scenario
where such an operation is strictly necessary, i.e., a scenario where
we can not solve the same problem with the current sceheme.
Another (perhaps minor) problem I see with this scheme is that if/when
we introduce management of kernel memory from user-level , there
might be a problem of accounting. For each mapping there is a
"mapping node" in the in kernel mapping database. Upon a map
operation, the memory for this mapping node can be accounted to either
the mapper or the mappee. If memory is accounted to the mappee there
is no problem with your new ??? operation. If the memory is accounted
to the mapper, however, we have two choices:
1. Account the memory to A. This has the problem that a child (B)
can consume resources from its parent (A).
2. Account the memory to B. This kind of defeats the scheme of
accounting memory to the mapper since B is not really the mapper
after such an operation has been performed. Also, if B chooses
to revoke the resouce for the mapping node it will break the
mapping A -> C, which is probably not what you wanted in the
Anyhow, Andy is probably the right person to say whether this is a
real problem or not.
More information about the l4-hackers