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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Nov 2009 14:12:41 +0800
From:	Luming Yu <luming.yu@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Len Brown <lenb@...nel.org>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	"Siddha, Suresh B" <suresh.b.siddha@...el.com>,
	Arjan van de Ven <arjan@...ux.intel.com>
Subject: [RFC PATCH] use acpi_idle_enter_simple if bm_check && !.bm_control

Hi there,

I came across acpi processor idle driver, noticed that we can cut a
bit overhead at C3 entry that can improve C3 residency a bit,
especially when it has similar kernel config as old RHEL 5 kernel
(2.6.18) on systems with as many as 64 logical CPUs. The point of this
patch is bm_sts is an optional bit. It never returns 1 on systems with
bm_check && !bm_control I tested. Instead, I have observed lower C3
residency due to accessing bm_sts and relevant code on a system with
64 logical CPUs with HZ=1000. Please review. If make sense, please
apply.

Ps. The patch is enclosed in attachment. The in-lined one is c&p of it
for reading.

Thanks,
Luming

Signed-off-by: Yu Luming <luming.yu@...el.com>

 processor_idle.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

 processor_idle.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
[root@...core tmp]# cat 12.patch
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 66393d5..ee72bbb 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -895,7 +895,7 @@ static int acpi_idle_enter_simple(struct
cpuidle_device *dev,
 	 */
 	lapic_timer_state_broadcast(pr, cx, 1);

-	if (cx->type == ACPI_STATE_C3)
+	if (cx->type == ACPI_STATE_C3 && !pr->flags.bm_check)
 		ACPI_FLUSH_CPU_CACHE();

 	kt1 = ktime_get_real();
@@ -1110,6 +1110,8 @@ static int acpi_processor_setup_cpuidle(struct
acpi_processor *pr)
 			state->enter = pr->flags.bm_check ?
 					acpi_idle_enter_bm :
 					acpi_idle_enter_simple;
+			if (pr->flags.bm_check && !pr->flags.bm_control)
+				state->enter = acpi_idle_enter_simple;
 			break;
 		}

Download attachment "12.patch" of type "application/octet-stream" (754 bytes)

Powered by blists - more mailing lists