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-next>] [day] [month] [year] [list]
Date:	Wed, 24 Feb 2010 09:19:33 +0100
From:	Robert Schöne <robert.schoene@...dresden.de>
To:	Arjan van de Ven <arjan@...ux.intel.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	kernel list <linux-kernel@...r.kernel.org>
Subject: Patch for tracing c states (power_end) on x86

Hello,

Since noone replied to my last mail (Febr. 15th, 11:42), describing the
way to fix the missing c-state tracing, here's a patch.
Maybe its easier that way.

(I used the perf-fixes-for-linus git tree to obtain a
more-then-up-to-date version)

Bye Robert


diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 02d6780..b1cfb88 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -384,6 +384,7 @@ void default_idle(void)
                else
                        local_irq_enable();
                current_thread_info()->status |= TS_POLLING;
+               trace_power_end(1);
        } else {
                local_irq_enable();
                /* loop is done by the caller */
@@ -451,6 +452,7 @@ void mwait_idle_with_hints(unsigned long ax,
unsigned long cx)
                if (!need_resched())
                        __mwait(ax, cx);
        }
+       trace_power_end((ax>>4)+1);
 }
 
 /* Default MONITOR/MWAIT with no hints, used for default C1 state */
@@ -467,6 +469,7 @@ static void mwait_idle(void)
                        __sti_mwait(0, 0);
                else
                        local_irq_enable();
+               trace_power_end(1);
        } else
                local_irq_enable();
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ