Skip to content

Commit

Permalink
Fix incorrect LRU algorithm (#2778)
Browse files Browse the repository at this point in the history
* Recheck state after acquiring lock

Signed-off-by: Alan Jowett <[email protected]>

* Mark entry with current generation when moving to hot-list

Signed-off-by: Alan Jowett <[email protected]>

---------

Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan-Jowett and Alan Jowett authored Aug 22, 2023
1 parent 7e1f0aa commit b33adb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/execution_context/ebpf_maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ _insert_into_hot_list(_Inout_ ebpf_core_lru_map_t* map, _Inout_ ebpf_lru_entry_t
ebpf_list_remove_entry(&entry->list_entry);
ebpf_list_insert_tail(&map->hot_list, &entry->list_entry);
map->hot_list_size++;
entry->generation = map->current_generation;

_merge_hot_into_cold_list_if_needed(map);

Expand Down

0 comments on commit b33adb3

Please sign in to comment.