Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232272 > unrolled thread
| Started by | Andi Kleen <andi@firstfloor.org> |
|---|---|
| First post | 2015-09-24 19:20 +0200 |
| Last post | 2015-09-24 19:30 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
Updated scalable urandom patchkit Andi Kleen <andi@firstfloor.org> - 2015-09-24 19:20 +0200
[PATCH 3/3] random: Add pool name to urandom_read trace point Andi Kleen <andi@firstfloor.org> - 2015-09-24 19:30 +0200
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Date | 2015-09-24 19:20 +0200 |
| Subject | Updated scalable urandom patchkit |
| Message-ID | <qcilz-143-5@gated-at.bofh.it> |
Updated patchkit to make /dev/urandom scale on larger systesm. I addressed all the review comments. See ChangeLogs in the individual patches. -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Date | 2015-09-24 19:30 +0200 |
| Subject | [PATCH 3/3] random: Add pool name to urandom_read trace point |
| Message-ID | <qcivg-1fu-13@gated-at.bofh.it> |
| In reply to | #1232272 |
From: Andi Kleen <ak@linux.intel.com>
Now that we have multiple nonblocking_pools it makes sense to report
the name of the pool in the urandom_read trace point. Extend
the trace point to report the name too.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
drivers/char/random.c | 2 +-
include/trace/events/random.h | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 31141b4..c44831d 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1588,7 +1588,7 @@ urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3));
ret = extract_entropy_user(pool, buf, nbytes);
- trace_urandom_read(8 * nbytes, ENTROPY_BITS(pool),
+ trace_urandom_read(pool->name, 8 * nbytes, ENTROPY_BITS(pool),
ENTROPY_BITS(pool));
return ret;
}
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index 4684de3..3b5ab5a 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -288,25 +288,27 @@ TRACE_EVENT(random_read,
);
TRACE_EVENT(urandom_read,
- TP_PROTO(int got_bits, int pool_left, int input_left),
+ TP_PROTO(const char *pool, int got_bits, int pool_left, int input_left),
- TP_ARGS(got_bits, pool_left, input_left),
+ TP_ARGS(pool, got_bits, pool_left, input_left),
TP_STRUCT__entry(
+ __field( const char *, pool )
__field( int, got_bits )
__field( int, pool_left )
__field( int, input_left )
),
TP_fast_assign(
+ __entry->pool = pool;
__entry->got_bits = got_bits;
__entry->pool_left = pool_left;
__entry->input_left = input_left;
),
TP_printk("got_bits %d nonblocking_pool_entropy_left %d "
- "input_entropy_left %d", __entry->got_bits,
- __entry->pool_left, __entry->input_left)
+ "input_entropy_left %d from %s", __entry->got_bits,
+ __entry->pool_left, __entry->input_left, __entry->pool)
);
#endif /* _TRACE_RANDOM_H */
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web