* [patch 9/9] serios: async shutdown
@ 2009-05-12 20:43 akpm
2009-05-14 3:20 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2009-05-12 20:43 UTC (permalink / raw)
To: dtor; +Cc: linux-input, akpm, shaohua.li, arjan
From: Shaohua Li <shaohua.li@intel.com>
serio shutdown is quite slow. It sometimes will take 0.2s for each port.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/input/serio/serio.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff -puN drivers/input/serio/serio.c~serios-async-shutdown drivers/input/serio/serio.c
--- a/drivers/input/serio/serio.c~serios-async-shutdown
+++ a/drivers/input/serio/serio.c
@@ -36,6 +36,7 @@
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/freezer.h>
+#include <linux/async.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
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)
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 9/9] serios: async shutdown
2009-05-12 20:43 [patch 9/9] serios: async shutdown akpm
@ 2009-05-14 3:20 ` Dmitry Torokhov
2009-05-14 3:49 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2009-05-14 3:20 UTC (permalink / raw)
To: akpm; +Cc: linux-input, shaohua.li, arjan
Hi,
On Tue, May 12, 2009 at 01:43:11PM -0700, akpm@linux-foundation.org wrote:
> From: Shaohua Li <shaohua.li@intel.com>
>
> 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.
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> Cc: Arjan van de Ven <arjan@infradead.org>
> Cc: Dmitry Torokhov <dtor@mail.ru>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/input/serio/serio.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff -puN drivers/input/serio/serio.c~serios-async-shutdown drivers/input/serio/serio.c
> --- a/drivers/input/serio/serio.c~serios-async-shutdown
> +++ a/drivers/input/serio/serio.c
> @@ -36,6 +36,7 @@
> #include <linux/kthread.h>
> #include <linux/mutex.h>
> #include <linux/freezer.h>
> +#include <linux/async.h>
>
> MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 9/9] serios: async shutdown
2009-05-14 3:20 ` Dmitry Torokhov
@ 2009-05-14 3:49 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2009-05-14 3:49 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, shaohua.li, arjan, Greg KH
On Wed, 13 May 2009 20:20:56 -0700 Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Tue, May 12, 2009 at 01:43:11PM -0700, akpm@linux-foundation.org wrote:
> > From: Shaohua Li <shaohua.li@intel.com>
> >
> > 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.
> 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.
OK, more thought is needed. I dropped the patches.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-14 3:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 20:43 [patch 9/9] serios: async shutdown akpm
2009-05-14 3:20 ` Dmitry Torokhov
2009-05-14 3:49 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).