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

Use memfd for file data #835

Open
Xyene opened this issue Feb 13, 2021 · 1 comment · May be fixed by #990
Open

Use memfd for file data #835

Xyene opened this issue Feb 13, 2021 · 1 comment · May be fixed by #990

Comments

@Xyene
Copy link
Member

Xyene commented Feb 13, 2021

We can create a memfd pointing to decompressed problem data, and pass that off to the submissions.

Pros:

  • no more piping necessary in judge; fewer context switches as a result
  • submissions can seek the fd
  • still no disk thrashing

Cons(?):

  • 3.7+ kernel necessary
  • extra memcpy
@quantum5
Copy link
Member

Support for creation of memfd-backed files is implemented in #836, with unlinked temporary files as fallback on FreeBSD.

This should now be a matter of writing decompressed data into an MemoryIO instance and passing the fd to TracedPopen.

@quantum5 quantum5 linked a pull request Jan 30, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants