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

Get rid of permutation table in dynamic Maglev #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eoglaba
Copy link

@eoglaba eoglaba commented Jun 11, 2024

Fixes #18

This change gets rid of the huge permutation table. It turns out that the necessary values can be computed just as fast on the fly: there's no need to retrieve them from memory.
Another modification is that nfqlb (de)activate computes the new lookup table in a temporary array and copies the results to the actual lookup table in shared memory only when the Maglev computation is done: this makes sure that the loadbalancer does not throw away packets while Maglev computation is taking place.

This PR changes only the dynamic Maglev computation: the static Maglev parts (which are used only for reference) still use the old permutation table-based method.

Attached is a graph about the overall speedup achieved in the populate function. The proposed new method creates an equivalent lookup table.
speedup

As you see, the new method is faster until we have about 60 targets or so.

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.

nfqlb init can crash with M primes greater than 65536
1 participant