aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2013-10-03 01:08:15 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-10-10 14:32:22 -0400
commit6265e169cd313d6f3aad3c33d0a5b0d9624f69f5 (patch)
treee029093b5e94f431f1d00cb13bf76bd024abfe7a /include/trace
parentrandom: drop trickle mode (diff)
downloadlinux-dev-6265e169cd313d6f3aad3c33d0a5b0d9624f69f5.tar.xz
linux-dev-6265e169cd313d6f3aad3c33d0a5b0d9624f69f5.zip
random: push extra entropy to the output pools
As the input pool gets filled, start transfering entropy to the output pools until they get filled. This allows us to use the output pools to store more system entropy. Waste not, want not.... Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/random.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index 2ffcaec5860a..527b5dc1b416 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -87,6 +87,28 @@ TRACE_EVENT(credit_entropy_bits,
(void *)__entry->IP)
);
+TRACE_EVENT(push_to_pool,
+ TP_PROTO(const char *pool_name, int pool_bits, int input_bits),
+
+ TP_ARGS(pool_name, pool_bits, input_bits),
+
+ TP_STRUCT__entry(
+ __field( const char *, pool_name )
+ __field( int, pool_bits )
+ __field( int, input_bits )
+ ),
+
+ TP_fast_assign(
+ __entry->pool_name = pool_name;
+ __entry->pool_bits = pool_bits;
+ __entry->input_bits = input_bits;
+ ),
+
+ TP_printk("%s: pool_bits %d input_pool_bits %d",
+ __entry->pool_name, __entry->pool_bits,
+ __entry->input_bits)
+);
+
DECLARE_EVENT_CLASS(random__get_random_bytes,
TP_PROTO(int nbytes, unsigned long IP),