Add tunables for channel programs

This patch adds tunables for modifying the maximum memory limit and
maximum instruction limit that can be specified when running a channel
program.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov
Reviewed-by: Sara Hartse <sara.hartse@delphix.com>
Signed-off-by: John Gallagher <john.gallagher@delphix.com>
External-issue: LX-1085
Closes #7618
This commit is contained in:
John Gallagher
2018-06-15 15:10:42 -07:00
committed by Brian Behlendorf
parent 7b98f0d91f
commit 917f475fba
5 changed files with 49 additions and 26 deletions
@@ -61,12 +61,12 @@ log_mustnot_checkerror_program "Memory limit exhausted" -m 1 $TESTPOOL - <<-EOF
return s
EOF
log_mustnot_checkerror_program "Invalid memory limit" \
-m 1000000000000 $TESTPOOL - <<-EOF
log_mustnot_checkerror_program "Invalid instruction or memory limit" \
-m 200000000 $TESTPOOL - <<-EOF
return 1;
EOF
log_mustnot_checkerror_program "Invalid memory limit" \
log_mustnot_checkerror_program "Return value too large" \
-m 9223372036854775808 $TESTPOOL - <<-EOF
return 1;
EOF