aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/random.c
diff options
context:
space:
mode:
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>2017-11-20 16:17:58 -0500
committerRichard Weinberger <richard@nod.at>2018-02-19 13:38:51 -0500
commitff6a17989c08b0bb0fd490cc500b084581b3a9b9 (patch)
tree1f87a8f21ad3659e61e4958faece57994a842cde /arch/um/drivers/random.c
parent4d1a535b8ec5e74b42dfd9dc809142653b2597f6 (diff)
Epoll based IRQ controller
1. Removes the need to walk the IRQ/Device list to determine who triggered the IRQ. 2. Improves scalability (up to several times performance improvement for cases with 10s of devices). 3. Improves UML baseline IO performance for one disk + one NIC use case by up to 10%. 4. Introduces write poll triggered IRQs. 5. Prerequisite for introducing high performance mmesg family of functions in network IO. 6. Fixes RNG shutdown which was leaking a file descriptor Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/random.c')
-rw-r--r--arch/um/drivers/random.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 37c51a6be690..778a0e52d5a5 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -13,6 +13,7 @@
13#include <linux/miscdevice.h> 13#include <linux/miscdevice.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/uaccess.h> 15#include <linux/uaccess.h>
16#include <init.h>
16#include <irq_kern.h> 17#include <irq_kern.h>
17#include <os.h> 18#include <os.h>
18 19
@@ -154,7 +155,14 @@ err_out_cleanup_hw:
154/* 155/*
155 * rng_cleanup - shutdown RNG module 156 * rng_cleanup - shutdown RNG module
156 */ 157 */
157static void __exit rng_cleanup (void) 158
159static void cleanup(void)
160{
161 free_irq_by_fd(random_fd);
162 os_close_file(random_fd);
163}
164
165static void __exit rng_cleanup(void)
158{ 166{
159 os_close_file(random_fd); 167 os_close_file(random_fd);
160 misc_deregister (&rng_miscdev); 168 misc_deregister (&rng_miscdev);
@@ -162,6 +170,7 @@ static void __exit rng_cleanup (void)
162 170
163module_init (rng_init); 171module_init (rng_init);
164module_exit (rng_cleanup); 172module_exit (rng_cleanup);
173__uml_exitcall(cleanup);
165 174
166MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver"); 175MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver");
167MODULE_LICENSE("GPL"); 176MODULE_LICENSE("GPL");