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: <CY8PR11MB77474CEA74FB6A572D9856D28D862@CY8PR11MB7747.namprd11.prod.outlook.com>
Date: Tue, 13 Aug 2024 10:17:41 +0000
From: "King, Colin" <colin.king@...el.com>
To: Paul Menzel <pmenzel@...gen.mpg.de>
CC: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Steven Rostedt
	<rostedt@...dmis.org>
Subject: RE: [PATCH][next] ACPI: align slab for improved memory performance

Hi Paul,

Thanks for the testing. How many iterations of the test did you do?  I ran mine 100 times with each config to get a reliable set of measurements.

Colin

-----Original Message-----
From: Paul Menzel <pmenzel@...gen.mpg.de> 
Sent: Tuesday, August 13, 2024 11:15 AM
To: King, Colin <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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ