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

Digging for some features #10231

Merged
merged 4 commits into from
May 4, 2021
Merged

Digging for some features #10231

merged 4 commits into from
May 4, 2021

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented May 2, 2021

  • Implement s128 type (unused, maybe it's better to remove it completely)
  • Add native API flag for CoW memory (copy-on-write)
  • Dig for portable memory overcommitting technique. For now, try to map temporary sparse file (which is filled with zeros and doesn't occupy disk space) with mentioned cow flag. Try to get 32G of "writable" memory. There was an idea of implementing scalable breakpoint framework on base of it (interrupts, conditionals, memory access bp, etc).

CoW is copy-on-write mapping type.
@Nekotekina Nekotekina force-pushed the fxo branch 5 times, most recently from 2951963 to f4471cd Compare May 4, 2021 14:55
@Nekotekina Nekotekina changed the title Implement s128 type (MSVC) Digging for some features May 4, 2021
@Nekotekina Nekotekina merged commit 546b522 into RPCS3:master May 4, 2021
@RainbowCookie32
Copy link
Contributor

Seems to have caused issues for some users, at least on windows. Trying to get someone that can reproduce to open a proper issue.

https://cdn.discordapp.com/attachments/277227681836302338/839317980381708308/unknown.png
https://cdn.discordapp.com/attachments/277227681836302338/839322277929680926/Screenshot_34.png

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request May 5, 2021
Trying to workaround issues with sparse files (RPCS3#10231)
Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request May 5, 2021
Trying to workaround issues with sparse files (RPCS3#10231)
@Nekotekina
Copy link
Member Author

From the error code and line, it suspect they were running RPCS3 from non-NTFS storage. I hope new PR fixes it by using different location.

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request May 5, 2021
Trying to workaround issues with sparse files (RPCS3#10231)
@qurious-pixel
Copy link

How can I force this to /tmp instead of .cache?
else if (!f.open(fs::get_temp_dir() + "rpcs3_vm", fs::read + fs::rewrite) || !DeviceIoControl(f.get_handle(), FSCTL_SET_SPARSE, nullptr, 0, nullptr, 0, nullptr, nullptr))
I have cache mapped to my external ssd, and it is writing rpcs3_vm each boot of rpcs3 on Linux.

@Nekotekina
Copy link
Member Author

Does your ssd filesystem not support sparse files?

@MSuih
Copy link
Member

MSuih commented May 12, 2021

Also note that many file system utilities report reserved space for sparse files, not used space. ls -lsh might be better at displaying how much space the file actually takes

@qurious-pixel
Copy link

Does your ssd filesystem not support sparse files?

formated exfat.
Otherwise I would symlink rpcs3_vm to /tmp or somewhere else on the filesystem.
On ext4 the file is created instantly and boots right away, but on exfat formatted external ssd, the 30 second delay to file creation and boot is noticeable.

@arabek
Copy link
Contributor

arabek commented May 12, 2021

no FAT based filesystem supports sparse files. Issue is in user config, not in emu.

@Nekotekina
Copy link
Member Author

tmpfs also doesn't seem to support them, and may blow up ram which I want to avoid.
On Linux XDG_CACHE_HOME env can be specified to relocate cache somewhere else.

@qurious-pixel
Copy link

tmpfs also doesn't seem to support them, and may blow up ram which I want to avoid.
On Linux XDG_CACHE_HOME env can be specified to relocate cache somewhere else.

I am already using that, since the cache files were moved out of the "rpcs3" folder.
I had seen the if...else, so i was trying to see if i could create rpcs3_vm in /tmp.
I will just rsync all the files from custom XDG_CACHE_HOME, and leave as default, since my cache clears on reboot.
I just needed a place to keep the cache and shaderlog that will persist on reboot.
-- thanks for the feedback.

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.

5 participants