Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace simple IP pool free table with LRU implementation #451

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

vkatsuba
Copy link
Contributor

@vkatsuba vkatsuba commented Oct 27, 2021

Cherry-pick of #450


The free table was effectively acting as a queue (LRU). push and
pop operation where fast, but a direct removal of a single item
did require a full table scan.
For large IP pools, that could lead to unacceptable delays.

The LRU implementation uses two indexes and is much faster when
removing an item from the middle of the queue.

The free table was effectively acting as a queue (LRU). push and
pop operation where fast, but a direct removal of a single item
did require a full table scan.
For large IP pools, that could lead to unacceptable delays.

The LRU implementation uses two indexes and is much faster when
removing an item from the middle of the queue.
@vkatsuba vkatsuba requested a review from a team as a code owner October 27, 2021 14:58
@vkatsuba vkatsuba merged commit 7b89e31 into stable/3.1 Oct 27, 2021
@vkatsuba vkatsuba deleted the cherry-pick-3.1.1-rc3 branch October 27, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants