RE: [PATCH][next] ACPI: align slab for improved memory performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 
Sent: Tuesday, August 13, 2024 11:15 AM
To: King, Colin <colin.king@xxxxxxxxx>
Cc: Rafael J . Wysocki <rafael@xxxxxxxxxx>; Len Brown <lenb@xxxxxxxxxx>; linux-acpi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Steven Rostedt <rostedt@xxxxxxxxxxx>
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@xxxxxxxxx>
> ---
>   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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux