public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] ACPI: align slab for improved memory performance
@ 2024-08-08 22:21 Colin Ian King
  2024-08-13 10:14 ` Paul Menzel
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Ian King @ 2024-08-08 22:21 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, linux-acpi; +Cc: linux-kernel

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@intel.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
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-13 12:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-08 22:21 [PATCH][next] ACPI: align slab for improved memory performance Colin Ian King
2024-08-13 10:14 ` Paul Menzel
2024-08-13 10:17   ` King, Colin
2024-08-13 11:22     ` Paul Menzel
2024-08-13 11:31       ` King, Colin
2024-08-13 12:21         ` Paul Menzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox