Repository navigation
Store NativeDatagramPacketArray directly in the EpollEventLoop - #8062
Merged
Merged
Conversation
Member
Author
|
@jasontedor this is related to #8051 and #8017 |
normanmaurer
force-pushed
the
native_datagram_packet_no_fast_thread_local
branch
from
June 27, 2018 08:17
a7ae1e8 to
7613d65
Compare
Member
Author
|
Also @johnou |
johnou
approved these changes
Jun 27, 2018
ejona86
approved these changes
Jun 27, 2018
| if (outboundBuffer == null) { | ||
| break; | ||
| } | ||
| outboundBuffer.forEachFlushedMessage(array); |
Member
There was a problem hiding this comment.
Where was this done before? Yeah... I don't understand how the code worked before this change; I don't see anything that adds to the NativeDatagramPacketArray.
Member
Author
There was a problem hiding this comment.
forEachFlushedMessage does
Member
Author
There was a problem hiding this comment.
This was done before in the getInstance call
ejona86
requested changes
Jun 27, 2018
| if (outboundBuffer == null) { | ||
| break; | ||
| } | ||
| outboundBuffer.forEachFlushedMessage(array); |
| if (Native.IS_SUPPORTING_SENDMMSG && in.size() > 1) { | ||
| NativeDatagramPacketArray array = NativeDatagramPacketArray.getInstance(in); | ||
| NativeDatagramPacketArray array = ((EpollEventLoop) eventLoop()).cleanDatagramPacketArray(); | ||
| ChannelOutboundBuffer outboundBuffer = unsafe().outboundBuffer(); |
Member
Author
There was a problem hiding this comment.
Because I am stupid .... let me fix this and thanks for the review
Motivation: We can store the NativeDatagramPacketArray directly in the EpollEventLoop. This removes the need of using FastThreadLocal. Modifications: - Store NativeDatagramPacketArray directly in the EpollEventLoop (just as we do with IovArray as well). Result: Less FastThreadLocal usage and more consistent code.
normanmaurer
force-pushed
the
native_datagram_packet_no_fast_thread_local
branch
from
June 27, 2018 16:48
7613d65 to
d20370d
Compare
ejona86
approved these changes
Jun 27, 2018
This was referenced Jul 29, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
We can store the NativeDatagramPacketArray directly in the EpollEventLoop. This removes the need of using FastThreadLocal.
Modifications:
Result:
Less FastThreadLocal usage and more consistent code.