From 511c84d766c081d4caebd10b7d1704caac3ce8c7 Mon Sep 17 00:00:00 2001
From: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Date: Tue, 25 Feb 2025 10:43:04 +0530
Subject: [PATCH] Revert "ANDROID: gki_defconfig: enable
 CONFIG_KFENCE_STATIC_KEYS"

This reverts commit ef1134dd04cb1dc8479cf8666f70ebb8d12b224f.

Sometimes back commit cfb00a357864 ("arm64: jump_label: Ensure patched
jump_labels are visible to all CPUs") got merged into all stable
branches wherever applicable with citing a bug in static key which
does not synchronizes among the cpus and adds IPI to all cores to
fix this.

Kfence is one of the user of static key and recently, it has been
observed that after above commit during toggling kfence_allocation_key
IPI is being sent to the core which are there low power mode which
has regressed power numbers and after disabling CONFIG_KFENCE_STATIC_KEYS
we see workload improved in the range of 1% - 10% resulting in 1% - 4%
power savings for few audio playback, video decode & display cases and
with no regression on benchmarks.

Bug: 394509835
Change-Id: I8efa3280bf115c33cc957f83ccb8e578730aa5f5
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
---
 arch/arm64/configs/gki_defconfig | 1 -
 arch/x86/configs/gki_defconfig   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig
index 426e16a0b60a89..4d4a5b2827157f 100644
--- a/arch/arm64/configs/gki_defconfig
+++ b/arch/arm64/configs/gki_defconfig
@@ -770,7 +770,6 @@ CONFIG_KASAN_HW_TAGS=y
 CONFIG_KFENCE=y
 CONFIG_KFENCE_SAMPLE_INTERVAL=500
 CONFIG_KFENCE_NUM_OBJECTS=63
-CONFIG_KFENCE_STATIC_KEYS=y
 CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_TIMEOUT=-1
 CONFIG_SOFTLOCKUP_DETECTOR=y
diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig
index 858433f9846633..6747b8d462d0ba 100644
--- a/arch/x86/configs/gki_defconfig
+++ b/arch/x86/configs/gki_defconfig
@@ -699,7 +699,6 @@ CONFIG_DEBUG_MEMORY_INIT=y
 CONFIG_KFENCE=y
 CONFIG_KFENCE_SAMPLE_INTERVAL=500
 CONFIG_KFENCE_NUM_OBJECTS=63
-CONFIG_KFENCE_STATIC_KEYS=y
 CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_TIMEOUT=-1
 CONFIG_SOFTLOCKUP_DETECTOR=y
-- 
GitLab