serios: async shutdown
Subsystems (2)
PATCH 9/9 serios: async shutdown
From: Shaohua Li <[email protected]>
serio shutdown is quite slow. It sometimes will take 0.2s for each port.
---
drivers/input/serio/serio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/input/serio/serio.c renamed from drivers/input/serio/serio.c~serios-async-shutdown +8 -1
@@ -36,6 +36,7 @@#include <linux/kthread.h> #include <linux/mutex.h> #include <linux/freezer.h> +#include <linux/async.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Serio abstraction core" );
@@ -792,11 +793,17 @@ static void serio_cleanup(struct serio *mutex_unlock (&serio->drv_mutex); } +static void serio_async_shutdown (void *data,async_cookie_t cookie) +{ +struct serio *serio = data; +serio_cleanup (serio); +} +static void serio_shutdown (struct device *dev) {struct serio *serio =to_serio_port (dev); -serio_cleanup (serio); +async_schedule (serio_async_shutdown, serio); }static void serio_attach_driver (struct serio_driver *drv)
_
Dmitry Torokhov
maintainerHi,
Quoted 4 lines · On Tue, May 12, 2009 at 01:43:11PM -0700, [email protected] wrote:
From: Shaohua Li <[email protected]>
serio shutdown is quite slow. It sometimes will take 0.2s for each port.
This depends on the other patch you sent to Greg, I think these should go together. But I am uncomfortable at the ide of blasting all ports on i8042 simultaneously during shutdown. I'd be more comfortable if we were taking serio_mutex in serio_cleanup() so only one port is being worked on at a time.
Quoted 41 lines
Signed-off-by Shaohua Li <[email protected]>Cc Arjan van de Ven <[email protected]>Cc Dmitry Torokhov <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/input/serio/serio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)diff -puN
drivers/input/serio/serio.c~serios-async-shutdowndrivers/input/serio/serio.cdrivers/input/serio/serio.c renamed from drivers/input/serio/serio.c~serios-async-shutdown +8
-1@@ -36,6 +36,7 @@#include <linux/kthread.h> #include <linux/mutex.h> #include <linux/freezer.h> +#include <linux/async.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Serio abstraction core" );@@ -792,11 +793,17 @@ static void serio_cleanup(struct serio *mutex_unlock (&serio->drv_mutex); } +static void serio_async_shutdown (void *data,async_cookie_t cookie) +{ +struct serio *serio = data; +serio_cleanup (serio); +} +static void serio_shutdown (struct device *dev) {struct serio *serio =to_serio_port (dev); -serio_cleanup (serio); +async_schedule (serio_async_shutdown, serio); }static void serio_attach_driver (struct serio_driver *drv)_
Signature · 1 line
Dmitry
Quoted 7 lines · On Wed, 13 May 2009 20:20:56 -0700 Dmitry Torokhov <[email protected]>…
Quoted 4 lines · On Tue, May 12, 2009 at 01:43:11PM -0700, [email protected] wrote:
From: Shaohua Li <[email protected]>
serio shutdown is quite slow. It sometimes will take 0.2s for each port.
This depends on the other patch you sent to Greg,
synchronize-device-shutdown.patch, I assume.
Quoted 5 lines
I think these should
go together. But I am uncomfortable at the ide of blasting all ports on i8042 simultaneously during shutdown. I'd be more comfortable if we were takingserio_mutexinserio_cleanup()so only one port is being worked on at a time.
OK, more thought is needed. I dropped the patches.