judge-server
judge-server copied to clipboard
Use memfd for file data
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
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
.