Skip to content

Commit

Permalink
executors: globally allow THP sysfs entries
Browse files Browse the repository at this point in the history
Since both Java and Go ask for them, seems reasonable to give everyone access.
  • Loading branch information
Xyene committed Jun 2, 2024
1 parent 9672196 commit 2bad480
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions dmoj/executors/GO.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ class Executor(CompiledExecutor):
command = 'go'
syscalls = ['mincore', 'pselect6', 'mlock', 'setrlimit']
compiler_syscalls = ['copy_file_range', 'setrlimit']
fs = [
# Go will start without THP information, but has some tuning for when
# it is available -- so let's allow it to tell.
ExactFile('/sys/kernel/mm/transparent_hugepage/hpage_pmd_size'),
]
test_name = 'echo'
test_program = """\
package main
Expand Down
3 changes: 3 additions & 0 deletions dmoj/executors/base_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
ExactDir('/sys/devices/system/cpu'),
ExactFile('/sys/devices/system/cpu/online'),
ExactFile('/etc/selinux/config'),
ExactFile('/sys/kernel/mm/transparent_hugepage/enabled'),
ExactFile('/sys/kernel/mm/transparent_hugepage/hpage_pmd_size'),
ExactFile('/sys/kernel/mm/transparent_hugepage/shmem_enabled'),
]

if sys.platform.startswith('freebsd'):
Expand Down

0 comments on commit 2bad480

Please sign in to comment.