-
Notifications
You must be signed in to change notification settings - Fork 233
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
gk: convert all batched lookups into coroutines #370
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: add support to coroutines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: add support to coroutines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: add support to coroutines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: move processing of front packets to coroutines
The code has incorporated all the feedback. |
ce44b94
to
a93ecb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: add support to coroutines
This pull request needs to resolve the conflicts. |
547c8a1
to
cb555c1
Compare
Library CORO implements coroutines.
eac1227
to
da3a660
Compare
Below is the performance evaluation of the master branch with our updated scripts:
|
Below is the performance evaluation after applying this pull request:
|
Below is the CPU cycles profiling with 3 lcores + 2^25 flow entries:
Below is the memory loads profiling with 3 lcores + 2^25 flow entries:
Below is the stats with 3 lcores + 2^25 flow entries:
Note that the above profiling results are after applying the pull request. |
This patch gets everything set up to do the work of gk_proc() inside coroutines, but no work is actually moved into coroutines. The following patches gradually move the work of gk_proc() into coroutines.
Below is the performance evaluation after applying the latest updated pull request:
Below is the CPU cycles profiling with 3 lcores + 2^25 flow entries:
Below is the memory loads profiling with 3 lcores + 2^25 flow entries:
Below is the stats with 3 lcores + 2^25 flow entries:
|
This patch moves the following work to coroutines: 1. scanning of the flow table; 2. processing of front packets. Besides moving the processing of front packets to coroutines this patch streamlines the code to better fit the new model. For example, this patch simplifies the parameters of process_flow_entry() and its subordinate functions: gk_process_request(), gk_process_granted(), gk_process_declined(), and gk_process_bpf().
This patch prefetches the transmission fields of a packet when it is ready to be prepared for transmission.
436ab22
to
e52bbf2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gk: move some work to coroutines
if (likely(has_rss)) { | ||
task->task_hash = pkt->hash.rss; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must rewrite pkt->hash.rss
with pkt->hash.rss >> rss_bits
, where rss_bits
is pkt->hash.rss
are constant for a given GK instance.
GK blocks batch lookups to the flow table and the LPM table. This pull request reverts these batched lookups back to single lookups and moves the code into coroutines.