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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aaf516f8-eb36-4693-a002-a972d6f77b92@molgen.mpg.de>
Date: Tue, 13 Aug 2024 12:14:32 +0200
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Colin Ian King <colin.king@...el.com>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
 linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
 Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH][next] ACPI: align slab for improved memory performance

Dear Colin,


Thank you for your patch and working on decreasing the boot time.


Am 09.08.24 um 00:21 schrieb Colin Ian King:
> Enabling SLAB_HWCACHE_ALIGN for the ACPI object caches improves
> boot speed in the ACPICA core for object allocation and free'ing
> especially in the AML parsing and execution phases in boot. Testing
> with 100 boots shows an average boot saving in acpi_init of ~35000
> usecs compared to the unaligned version. Most of the ACPI objects
> being allocated and free'd are of very short life times in the
> critical paths for parsing and execution, so the extra memory used
> for alignment isn't too onerous.
> 
> Signed-off-by: Colin Ian King <colin.king@...el.com>
> ---
>   drivers/acpi/osl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 70af3fbbebe5..dab3d5089635 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1549,7 +1549,7 @@ void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags not_used)
>   acpi_status
>   acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t **cache)
>   {
> -	*cache = kmem_cache_create(name, size, 0, 0, NULL);
> +	*cache = kmem_cache_create(name, size, 0, SLAB_HWCACHE_ALIGN, NULL);
>   	if (*cache == NULL)
>   		return AE_ERROR;
>   	else

Thank you for the patch. I tested it on the Intel Kaby Lake laptop Dell 
XPS 13 9360, and unfortunately, my results are different from yours, 
that the time for `acpi_init()` *in*creased by 20 ms.

Without your patch:

     [    0.201471] initcall acpi_init+0x0/0x590 returned 0 after 112000 
usecs

With your patch:

     [    0.222321] initcall acpi_init+0x0/0x590 returned 0 after 132000 
usecs

Please find the logs attached.


Kind regards,

Paul
View attachment "20240813--linux-6.10-rc3--before-alignment.txt" of type "text/plain" (200752 bytes)

View attachment "20240813--linux-6.10-rc3--with-alignment.txt" of type "text/plain" (200308 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ