adjust stripe counts

This commit is contained in:
Ryan Fleury
2024-03-26 11:30:47 -07:00
parent 3e911a8c64
commit 4027338a2f
8 changed files with 53 additions and 13 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ geo_init(void)
geo_shared = push_array(arena, GEO_Shared, 1);
geo_shared->arena = arena;
geo_shared->slots_count = 1024;
geo_shared->stripes_count = 64;
geo_shared->stripes_count = Min(geo_shared->slots_count, os_logical_core_count());
geo_shared->slots = push_array(arena, GEO_Slot, geo_shared->slots_count);
geo_shared->stripes = push_array(arena, GEO_Stripe, geo_shared->stripes_count);
geo_shared->stripes_free_nodes = push_array(arena, GEO_Node *, geo_shared->stripes_count);
@@ -22,7 +22,7 @@ geo_init(void)
geo_shared->stripes[idx].cv = os_condition_variable_alloc();
}
geo_shared->fallback_slots_count = 1024;
geo_shared->fallback_stripes_count = 64;
geo_shared->fallback_stripes_count = Min(geo_shared->fallback_slots_count, os_logical_core_count());
geo_shared->fallback_slots = push_array(arena, GEO_KeyFallbackSlot, geo_shared->fallback_slots_count);
geo_shared->fallback_stripes = push_array(arena, GEO_Stripe, geo_shared->fallback_stripes_count);
for(U64 idx = 0; idx < geo_shared->fallback_stripes_count; idx += 1)