lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Apr 2009 11:38:32 -0400 (EDT)
From:	Len Brown <lenb@...nel.org>
To:	Bjorn Helgaas <bjorn.helgaas@...com>
Cc:	"Moore, Robert" <robert.moore@...el.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Alan Jenkins <alan-jenkins@...fmail.co.uk>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Kernel Testers List <kernel-testers@...r.kernel.org>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>
Subject: Re: [BISECTED] EEE PC hangs when booting off battery


> > In fact, ACPI methods can execute concurrently -- constrained by the ACPI specification itself. The "big lock" is released before anything that will block for a significant amount of time, allowing other methods to run.
> 
> We had a discussion about this a couple years ago:
>   http://www.mail-archive.com/linux-acpi%40vger.kernel.org/msg06976.html
> 
> Here's my understanding (please correct me if I'm wrong):
> 
> - The ACPI CA holds a mutex while executing an AML method (see
>   acpi_ex_enter_interpreter()).
> 
> - When an AML method blocks, the ACPI CA releases the mutex, which
>   allows another AML method to run while the first is blocked.
> 
> - Because of the mutex, at most one AML method can be executing at
>   any given time.  Others may have started, but they are blocked
>   until the current method completes or blocks itself.
> 
> - The undocumented "acpi_serialize" option makes the ACPI CA hold
>   the mutex for the entire duration of a method, even while a method
>   is blocked.
> 
> Based on that, my guess about the battery init being slow because of
> a long-running AML method might be incorrect, although I suppose
> it's still possible to write AML busy-loops that never block.
> 
> I'd really like to understand what's making it slow.  The only
> thing that looks at all unusual in acpi_battery_add() is
> acpi_battery_update(), and that evaluates _STA and _BIF and
> not much else.
> 
> Arjan, do you have any more information?  Is the battery driver
> slow on all laptops?  If not, where did you see the problem?  Do
> you have a DSDT for them?

Before I added Arjan's async battery patch, I booted a couple of laptops
with async disabled and enabled.  I saw about 40 usec battery init (T61, 
nx6325).

Obviously, this was too fast for async battery to have any measurable
benefit on these machines (though async disk probing, by comparison,
was a big win).

But Arjan saw O(300) usec serial battery init on an EEE PC,
which is why he optimized it.

Indeed, this thread was started b/c a failure was seen on an EEEPC,
probably because of its unusually slow timing.

-Len


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ