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

[Bug] vramfs deadlock caused by vramfs getting swapped to vram swap #31

Closed
Atrate opened this issue May 29, 2022 · 2 comments · Fixed by #32
Closed

[Bug] vramfs deadlock caused by vramfs getting swapped to vram swap #31

Atrate opened this issue May 29, 2022 · 2 comments · Fixed by #32

Comments

@Atrate
Copy link
Contributor

Atrate commented May 29, 2022

Hello,

I have set-up swap on VRAM using vramfs and the guide from https://wiki.archlinux.org/title/Swap_on_video_RAM#FUSE_filesystem .

The problem appears when, under high memory pressure, vramfs gets swapped to VRAM, causing a complete deadlock.

Solution: use the mlockall(MCL_CURRENT | MCL_FUTURE) syscall to lock vramfs's memory and not have it be swapped.

Workaround: #3 (comment)

@Atrate Atrate changed the title vramfs deadlock caused by vramfs getting swapped to vram swap [Bug] vramfs deadlock caused by vramfs getting swapped to vram swap May 29, 2022
@Overv
Copy link
Owner

Overv commented Jun 7, 2022

Could you make a PR to implement this solution? :) I'm not too familiar with mlockall, so I'm not sure where to put it.

@Atrate
Copy link
Contributor Author

Atrate commented Jun 10, 2022

Me neither, I'm afraid. I just know that a syscall like that exists, but I haven't ever implemented it.

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 a pull request may close this issue.

2 participants