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

Improve the design of context switch #8220

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

Conversation

firejox
Copy link
Contributor

@firejox firejox commented Sep 24, 2019

refer to #8193

@firejox firejox closed this Sep 24, 2019
@firejox firejox reopened this Sep 24, 2019
@jkthorne
Copy link
Contributor

This looks awesome I saw your issue but did not know enough to really respond to it. Do you have any benchmarks of this change?

@firejox
Copy link
Contributor Author

firejox commented Sep 25, 2019

I benchmark the threadring of kostya/crystal-benchmarks-game today. The new design performs slightly better than the origin one. Hence, the change will not cause the run-time overhead.

result gist

@jkthorne
Copy link
Contributor

Awesome thank you for the benchmarks.

@straight-shoota
Copy link
Member

I haven't been able to look at this in depth, yet. But it looks interesting. However, I'd ask to wait with this until after #7995 is merged. This is a performance improvement and new features have a higher priority.

@firejox
Copy link
Contributor Author

firejox commented Oct 12, 2019

@straight-shoota I can wait for that pr because it is just a direction about what we can do. I also agree that making crystal work on windows is 🚀 .

@straight-shoota
Copy link
Member

straight-shoota commented Nov 25, 2019

@firejox Could you please add back comments that describe the code's behaviour and reasoning behind it? Instead of removing the existing comments, maybe you can update them for the changes in this PR. This would help reviewing this PR and understanding the code later. Thanks.

@firejox
Copy link
Contributor Author

firejox commented Nov 26, 2019

@straight-shoota Ok, I will add them back.

@straight-shoota
Copy link
Member

This looks really great, especially with the comments that even improve what we had before.

However, I'm a bit overcharged with understanding everything that's going on. But I'm trusting in your expertise which seems to reach far further than mine in this regard 😄 It would be great if someone else could review this who is more familiar with the topic.

Did you validate this is working as expected on native hardware? I've tested it on x86-64 both linux and windows. But especially the ARM variants might be bit tricky?

@ysbaddaden
Copy link
Contributor

Yes, this MUST be tested on real ARM and AArch64 hardware if it wasn't. QEMU isn't enough, and real hardware will immediately exhibit any issues —run the std spec suite for example.

@yxhuvud
Copy link
Contributor

yxhuvud commented Aug 14, 2022

@straight-shoota At least some ARM variants should be pretty simple to test nowadays that Apple M1 is everywhere. (I don't have one though, so I can't do it). And we also have aarch64 variants of CI, but perhaps those are QEMU and thus not sufficient?

@straight-shoota
Copy link
Member

Yeah, indeed the infrastructure situation has improved. Our CI workers run on native ARM machines, so that should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants