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

avoid double transfers in putllc #5392

Merged
merged 2 commits into from Dec 4, 2018

Conversation

Projects
None yet
2 participants
@elad335
Copy link
Contributor

elad335 commented Dec 3, 2018

Fixes double transfer of 128-byte data from spu local storage. (perf fix)

Before (both):
image

After (non-TSX):
image

After (TSX): none, to_write was removed completely in tsx path.

Keep in mind that this was tested in MSVC only.

@elad335 elad335 force-pushed the elad335:pfix branch from 43a76b1 to b5a73b3 Dec 3, 2018

@@ -1021,15 +1021,12 @@ void spu_thread::do_putlluc(const spu_mfc_cmd& args)
raddr = 0;
}

auto& data = vm::_ref<decltype(rdata)>(addr);
const auto to_write = _ref<decltype(rdata)>(args.lsa & 0x3ff80);

This comment has been minimized.

Copy link
@Nekotekina

Nekotekina Dec 4, 2018

Member

Should be better to just use a reference here:
auto& to_write = _ref...

This comment has been minimized.

Copy link
@elad335

elad335 Dec 4, 2018

Author Contributor

Its better to fetch the data outside of the lock to reduce time of locking.

This comment has been minimized.

Copy link
@elad335

elad335 Dec 4, 2018

Author Contributor

well, using reference will be compiler proof so theres that.

This comment has been minimized.

Copy link
@Nekotekina

Nekotekina Dec 4, 2018

Member

Not sure what you mean. You moved data/to_write declaration without relation to effects explained in the PR text and duplicated to_write in an unusual way.
Regarding the lock, it's better to not put anything else inbetween reservation_acquire and reservation_lock.

This comment has been minimized.

Copy link
@elad335

elad335 Dec 4, 2018

Author Contributor

data/to_write were moved to the places where they are used, to_write decleration 'duplicate' is fixed.

@elad335 elad335 force-pushed the elad335:pfix branch 2 times, most recently from 0237166 to 2c4c38c Dec 4, 2018

@elad335 elad335 force-pushed the elad335:pfix branch from 2c4c38c to 118a221 Dec 4, 2018

@Nekotekina Nekotekina merged commit 90265ed into RPCS3:master Dec 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@elad335 elad335 deleted the elad335:pfix branch Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.