On Tue Feb 7 11:12:16 2023 +0000, Jinoh Kang wrote:
For example:
/* LFH group cache. Holds at most 1 group per bin. */ struct group_cache { struct group *bin_groups[BLOCK_SIZE_BIN_COUNT]; }; /* LFH state. Only allocated for growable heaps. */ struct lfh_state { struct bin bins[BLOCK_SIZE_BIN_COUNT]; /* each group_cache should reside in a different cache line if possible. */ struct group_cache *parallel_cache[ARRAY_SIZE(affinity_mapping)]; };
I considered doing this but I'd prefer to keep the inside the bin, it makes sure related things are grouped together and the code more readable. I think the shuffling is good enough.