From: Arjan van de Ven <arjan@infradead.org>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Subject: Re: acpi_battery_init() boot speed
Date: Fri, 17 Dec 2010 08:02:35 -0800 [thread overview]
Message-ID: <20101217080235.50838925@infradead.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1012170341160.20940@x980>
On Fri, 17 Dec 2010 03:46:12 -0500 (EST)
Len Brown <lenb@kernel.org> wrote:
> > wonder if the code could do just enough to register the device, and
> > do everything else in the background?
>
> or do it later on demand...
that makes complete sense...
but you can even just do that async.. to cut down the time of first
use....
if you want I can propose a patch for that based on the patch below...
>
> This patch reduces acpi_battery_init() time
> on the Lenovo S10-3 from 901,603 usec to 657 usec.
>
> AFAICT, the battery monitor etc worked fine.
>
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index 95649d3..79e8ba3 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -943,7 +943,6 @@ static int acpi_battery_add(struct acpi_device
> *device) if (ACPI_SUCCESS(acpi_get_handle(battery->device->handle,
> "_BIX", &handle)))
> set_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags);
> - acpi_battery_update(battery);
> #ifdef CONFIG_ACPI_PROCFS_POWER
> result = acpi_battery_add_fs(device);
> #endif
>
>
>
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
prev parent reply other threads:[~2010-12-17 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 8:13 acpi_battery_init() boot speed Len Brown
2010-12-15 8:15 ` Len Brown
2010-12-15 11:00 ` Arjan van de Ven
2010-12-15 20:27 ` Len Brown
2010-12-16 4:58 ` Arjan van de Ven
2010-12-17 4:31 ` Len Brown
2010-12-17 8:46 ` Len Brown
2010-12-17 16:02 ` Arjan van de Ven [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=20101217080235.50838925@infradead.org \
--to=arjan@infradead.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/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