From: Zhang Rui <rui.zhang@intel.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-pm <linux-pm@lists.linux-foundation.org>,
linux-acpi <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>, Pavel Machek <pavel@suse.cz>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"Van De Ven, Arjan" <arjan.van.de.ven@intel.com>
Subject: Re: [PATCH 8/8] i8042: support device async suspend & shutdown
Date: Thu, 16 Jul 2009 09:45:18 +0800 [thread overview]
Message-ID: <1247708718.26272.138.camel@rzhang-dt> (raw)
In-Reply-To: <87k52a6x62.fsf@basil.nowhere.org>
On Wed, 2009-07-15 at 18:46 +0800, Andi Kleen wrote:
> Zhang Rui <rui.zhang@intel.com> writes:
>
> > i8042 controller support device async actions.
> >
> > If boot option "dev_async_action" is added,
> > i8042 controller and its child devices can be
> > suspended/resumed/shutdown asynchronously.
> >
>
> From a quick look at the i8042 driver it still
> seems to do a lot of slow actions without actually sleeping
> or worse holding locks. e.g. the delay loop in i8042_flush()
>
> Did you measure how long that one takes?
>
> Due to the locks even preempt kernels couldn't do
> something during that time.
>
> The spinlocks are probably needed when the code is executed
> during interrupts, but perhaps the suspend variant
> could use a different code path.
>
> Perhaps it only makes sense to do this when this
> code is converted to sleep during delays too?
>
most of the psmouse suspend/shutdown time was cost by a ps2 reset
command.
In my test, the serio2 (psmouse) total suspend time is 0.42s, while
the psmouse_reset takes 0.4s.
i.e.
drivers/input/serio/libps2.c
int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int
command)
{
...
/*
* The reset command takes a long time to execute.
*/
timeout = msecs_to_jiffies(command == PS2_CMD_RESET_BAT ? 4000 : 500);
timeout = wait_event_timeout(ps2dev->wait,
!(ps2dev->flags & PS2_FLAG_CMD1), timeout);
...
}
so the patch could save suepend/shutdown time a lot, without any other
changes in psmouse driver.
thanks,
rui
prev parent reply other threads:[~2009-07-16 1:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 7:38 Zhang Rui
2009-07-15 0:37 ` Pavel Machek
2009-07-17 1:51 ` Zhang Rui
2009-07-17 2:40 ` Rafael J. Wysocki
2009-07-17 3:08 ` Zhang Rui
2009-07-15 10:46 ` Andi Kleen
2009-07-16 1:45 ` Zhang Rui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247708718.26272.138.camel@rzhang-dt \
--to=rui.zhang@intel.com \
--cc=andi@firstfloor.org \
--cc=arjan.van.de.ven@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@suse.cz \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®