Skip to content

Replace 'long' padding by 'byte' padding to avoid fields re-ordering on modern JDK#3165

Closed
lantalex wants to merge 2 commits intoreactor:mainfrom
lantalex:enhancement/improve_spsc_queue_padding
Closed

Replace 'long' padding by 'byte' padding to avoid fields re-ordering on modern JDK#3165
lantalex wants to merge 2 commits intoreactor:mainfrom
lantalex:enhancement/improve_spsc_queue_padding

Conversation

@lantalex
Copy link
Copy Markdown
Contributor

Hello,
On modern JDK (15+) good old trick using long fields as padding is no longer reliable. To prevent false-sharing we could use byte padding in the same way, as in original SpscArrayQueue

@lantalex lantalex requested a review from a team as a code owner August 24, 2022 17:44
@chemicL
Copy link
Copy Markdown
Member

chemicL commented Aug 25, 2022

Thank you for the PR. Please update the file header as per output of the initial CI run.

@lantalex
Copy link
Copy Markdown
Contributor Author

Thank you for the PR. Please update the file header as per output of the initial CI run.

Fixed

@chemicL
Copy link
Copy Markdown
Member

chemicL commented Aug 25, 2022

Please consider changing the merge target to 3.4.x instead of main so this improvement can be made available quicker than in 3.5.0.

@lantalex lantalex changed the base branch from main to 3.4.x August 25, 2022 12:23
@lantalex lantalex changed the base branch from 3.4.x to main August 25, 2022 12:23
@lantalex
Copy link
Copy Markdown
Contributor Author

Please consider changing the merge target to 3.4.x instead of main so this improvement can be made available quicker than in 3.5.0.

Created new PR for 3.4.x, closing this.

@lantalex lantalex closed this Aug 25, 2022
@lantalex lantalex deleted the enhancement/improve_spsc_queue_padding branch August 28, 2022 08:18
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.

2 participants