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

Vm and atomic improvements #9139

Merged
merged 8 commits into from Oct 28, 2020
Merged

Vm and atomic improvements #9139

merged 8 commits into from Oct 28, 2020

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Oct 26, 2020

Atomic improvement aims to improve TSX performance by reducing waiting time on some heavy thread notification.

VM changes try to get rid of reservation_lock and reduce the concept of reservation bits as simple contention counter (currently they are split to "unique lock" and "shared lock counter").

In the meantime, some improvements for Non-TSX were made and significantly improved PUT performance (writes from SPU to main memory).

Please test for regressions.

{
res = &vm::reservation_lock(addr).first;
}
rsx_log.fatal("NV406E semaphore unexpected address. Please report to the developers. (offset=0x%x, addr=0x%x)", offset, addr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Notification can be very heavy, especially if we need to wake many threads.
Callback is set for cpu_thread in order to set wait flag accordingly.
Allocate "personal" range lock variable for each spu_thread.
Switch from reservation_lock to range lock for all stores.
Detect actual memory mirrors in shareable cache setup logic.
Complementarily.
Also refactored to make waiting mask non-template arg.
Remove vm::reservation_lock from it.
Use lock bits to prevent memory clobbering in GETLLAR.
Improve u128 for MSVC since it's used for bitlocking.
Improve 128 bit atomics for the same reason.
Improve vm::reservation_op and friends.
Reuse some internal locking mechanisms.
Also fix vm::range_lock missing check.
Allow more in first-chance transactions.
Allow abandonment of PUTLLC as in original path.
Make PUTLLUC unconditionally shared-locked.
Give PUTLLC +1 priority (minor change).
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

2 participants