mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
ealanos: Don't use Hoitaja's CPU core for cells, because else the a cell's strict performance isolation would be violated by sharing a CPU core with Hoitaja.
This commit is contained in:
@@ -80,7 +80,14 @@ class Hoitaja::Core_allocator
|
||||
|
||||
unsigned int cores_share = _calculate_resource_share(priority);
|
||||
|
||||
return Genode::Affinity::Location( _cores_for_cells-cores_share, 0, cores_share, 1 ); /* always use the core_share last cores, for now */
|
||||
unsigned int xpos = _cores_for_cells - cores_share;
|
||||
|
||||
if (xpos <= 0) {
|
||||
xpos = 1;
|
||||
cores_share -= 1;
|
||||
}
|
||||
|
||||
return Genode::Affinity::Location( xpos, 0, cores_share, 1 ); /* always use the core_share last cores, for now */
|
||||
}
|
||||
|
||||
void free_cores_from_cell(::Sandbox::Child &cell)
|
||||
@@ -116,10 +123,17 @@ class Hoitaja::Core_allocator
|
||||
|
||||
if (*xpos - static_cast<int>(cores_share) <= *lower_limit) {
|
||||
cores_share-= *lower_limit; // Save one core for Hoitaja
|
||||
}
|
||||
}
|
||||
|
||||
Genode::Affinity::Location location(*xpos - cores_share, resources.affinity.location().ypos(), cores_share, resources.affinity.location().height());
|
||||
unsigned int new_xpos = *xpos - cores_share;
|
||||
if (!new_xpos) {
|
||||
new_xpos = 1;
|
||||
cores_share -= 1;
|
||||
}
|
||||
|
||||
Genode::Affinity::Location location(new_xpos, resources.affinity.location().ypos(), cores_share, resources.affinity.location().height());
|
||||
|
||||
Genode::log(cell.name(), ": ", location);
|
||||
/*if (resources.affinity.location() != location) { // Only update, if location has actually changed
|
||||
cell.update_affinity(Genode::Affinity(resources.affinity.space(), location));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user