From 6265e169cd313d6f3aad3c33d0a5b0d9624f69f5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 3 Oct 2013 01:08:15 -0400 Subject: 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" --- include/trace/events/random.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/trace') 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), -- cgit v1.2.3