summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2022-04-06 18:44:26 -0700
committerTreeHugger Robot <treehugger-gerrit@google.com>2023-03-06 22:44:05 +0000
commit7e2ad88707ddc86263cab75ba89d21108a5b554b (patch)
tree4c8a35d8c64edff4a00858af99b44ba05618b85b
parent7f6a736b208c7fb78f0902ca0b793b885115ac95 (diff)
downloadtrusty-7e2ad88707ddc86263cab75ba89d21108a5b554b.tar.gz
ANDROID: trusty-log: make rate limit configurable
Expose the rate limit interval and burst values as module parameters. Set the interval parameter to zero to disable rate limiting. Bug: 228882651 Signed-off-by: Marco Nelissen <marcone@google.com> Change-Id: Ib7b645052de4b848a55a11c72d30c3718a4a8496
-rw-r--r--drivers/trusty/trusty-log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c
index 944d5b0..fde7190 100644
--- a/drivers/trusty/trusty-log.c
+++ b/drivers/trusty/trusty-log.c
@@ -72,6 +72,10 @@ module_param_call(log_size, trusty_log_size_set, trusty_log_size_get, NULL,
static struct ratelimit_state trusty_log_rate_limit =
RATELIMIT_STATE_INIT("trusty_log", 1 * HZ, 100);
+module_param_named(log_ratelimit_burst, trusty_log_rate_limit.burst, int, 0644);
+module_param_named(log_ratelimit_interval, trusty_log_rate_limit.interval, int,
+ 0644);
+
/**
* struct trusty_log_sfile - trusty log misc device state
*