Removed false-sharing on cacheline holding a cell's yield flag.

This commit is contained in:
Michael Mueller
2025-09-18 15:53:21 +02:00
parent 04bf2ed28c
commit 12a844ad90
3 changed files with 5 additions and 5 deletions

View File

@@ -219,7 +219,7 @@ namespace Tukija {
*/ */
struct Worker { struct Worker {
unsigned long yield_flag{0}; /* This flag will be set if a yield request has been filed */ unsigned long yield_flag{0}; /* This flag will be set if a yield request has been filed */
unsigned long padding[3]; unsigned long padding[7];
}; };
@@ -329,7 +329,7 @@ namespace Tukija {
static Cip * static Cip *
cip() cip()
{ {
return reinterpret_cast<Cip *>(0x7fffbffd7000); return reinterpret_cast<Cip *>(0x7fffbffd3000);
} }
}; };
@@ -1087,7 +1087,7 @@ namespace Tukija {
public: public:
enum { DEFAULT_QUANTUM = 1000, DEFAULT_PRIORITY = 64 }; enum { DEFAULT_QUANTUM = 1500, DEFAULT_PRIORITY = 64 };
Qpd(mword_t quantum = DEFAULT_QUANTUM, Qpd(mword_t quantum = DEFAULT_QUANTUM,
mword_t priority = DEFAULT_PRIORITY) mword_t priority = DEFAULT_PRIORITY)

View File

@@ -91,7 +91,7 @@ class Ealan::Cell_component : public Genode::Rpc_object<Cell>,
* Only a region map needs to be allocated here, because the kernel will already * Only a region map needs to be allocated here, because the kernel will already
* allocate a frame for this cell CIP during the syscall. * allocate a frame for this cell CIP during the syscall.
*/ */
Core::platform().region_alloc().alloc_aligned(4 * Tukija::PAGE_SIZE_BYTE, Tukija::PAGE_SIZE_LOG2).with_result( Core::platform().region_alloc().alloc_aligned(8 * Tukija::PAGE_SIZE_BYTE, Tukija::PAGE_SIZE_LOG2).with_result(
[&](void *ptr) { _cip = static_cast<Tukija::Cip*>(ptr); }, [&](void *ptr) { _cip = static_cast<Tukija::Cip*>(ptr); },
[&](Genode::Range_allocator::Alloc_error) { throw Genode::Out_of_ram(); }); [&](Genode::Range_allocator::Alloc_error) { throw Genode::Out_of_ram(); });

View File

@@ -432,7 +432,7 @@ Core::Platform::Platform()
region_alloc().remove_range((addr_t)_tip, get_page_size() * 128); region_alloc().remove_range((addr_t)_tip, get_page_size() * 128);
/* exclude CIP */ /* exclude CIP */
region_alloc().remove_range((addr_t)Tukija::Cip::cip(), get_page_size() * 4); region_alloc().remove_range((addr_t)Tukija::Cip::cip(), get_page_size() * 8);
/* sanity checks */ /* sanity checks */
addr_t check [] = { addr_t check [] = {