XaiJu
Nekotekina
Nekotekina

patreon


Status update from Nekotekina (2020-12-31)

Hello, my friends. Merry Christmas (maybe too late) and Happy New Year. This 2020 year was hard and it finally ended. And I really wished to implement some major features and polish others before it ends, but it seems that I'm out of time, so I'm writing this report. It will be simple: what has been done and what are my current plans. And of course, sorry for all these delays.

As promised in previous post, I rebased RPCS3 fork of LLVM to stable LLVM11 release.

Sadly, I failed to implement all my plans and reach the root of TSX-FA problem, although the results seemed promising. I must admit, in current state, using TSX is still not recommended if you experience any issues with it, but I will look into it and see what can be done. It would be a pity to lose an amazing technology that surpasses "scary" PS3 atomic cache line operations.

Regarding immediate plans, I'm looking forward to polish waitable atomics to the state that one of Elad's PR's can be merged [9208]. Maybe I overengineered them a bit so I may remove some unnecessary function to make the codebase lighter. But there are still some bugs that need to be found and fixed. One of the notable feature I implemented is the ability to wait on multiple atomic variables.

Recently I was working on cleaning up the codebase in order to improve compilation times at least a bit. C++ transitional includes are a disaster (it's when a needed include also takes an unneeded one with itself, and this graph of unnecessary includes can become very very big), thus removing unnecessary dependencies usually helps.

Also I implemented a simple thread pool which doesn't reset TLS (Thread Local Storage). It can help to improve performance a little if some game repeatedly creates and terminates threads for some purposes.

Improved and fixed u128 type on MSVC compiler (it's natively supported in GCC and Clang), certain helper utilities like utils::popcnt128. I also made usz alias for size_t in order to shorten it and "solve" the debate regarding std:: prefix on it. I almost finished homebrew shared_ptr and atomic_ptr (atomic version of the former) which are limited in comparison with STL versions however they are shorter, more lightweight and enable us to add additional features to them upon necessity. I may attempt to get rid of STL <mutex>, <shared_mutex>, <thread> dependencies. If it fits I may look into integrating homebrew shared_ptr into the codebase and create some lock-free paths with the help of its atomic version.

Removed HERE macro and replaced verify(HERE) with ensure which automatically captures source location (such as filename, line, function name), which should be part of C++20 but isn't available yet, although most its functionality is mysteriously available on all supported compilers. All other usages of HERE macro received similar treatment. There are few other homebrew utilities I implemented recently: auto_typemap, slow_mutex, fifo_mutex. It's linked to my cleanup plans in order to reduce header dependency hell, maybe I'll talk more about them in the next post.

Fortunately (although after several unsuccessful attempts) and with Megamouse help I think I finally fixed RPCS3 hanging issue on Windows, when remaining process refused to terminate after closing the main window.

In fact, all of this took a good amount of commits and pull requests, so I decided to not flood this post with links for brevity. One of the sad news is that we stopped using Travis because of its absurd limitations for open-source projects.

Thank you all for your support.

Comments

thanks guys for making disgaea series and army of two series playable, you dont know how much that means to me.

linkQatar G

Thanks for your hard work!!! Much appreciated!

silentmichal


More Creators