-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[S390] Add per-cpu idle time / idle count sysfs attributes.
Add two new sysfs entries per cpu: idle_count and idle_time. idle_count contains the number of times a cpu went into idle state. idle_time contains the time a cpu spent in idle state in microseconds. This can be used e.g. by powertop to tell how often idle state is entered and left. # cat /sys/devices/system/cpu/cpu0/idle_count 504 # cat /sys/devices/system/cpu/cpu0/idle_time 469734037 us Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
- Loading branch information
Heiko Carstens
authored and
Martin Schwidefsky
committed
Oct 22, 2007
1 parent
32346f4
commit fae8b22
Showing
3 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* include/asm-s390/cpu.h | ||
* | ||
* Copyright IBM Corp. 2007 | ||
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | ||
*/ | ||
|
||
#ifndef _ASM_S390_CPU_H_ | ||
#define _ASM_S390_CPU_H_ | ||
|
||
#include <linux/types.h> | ||
#include <linux/percpu.h> | ||
#include <linux/spinlock.h> | ||
|
||
struct s390_idle_data { | ||
spinlock_t lock; | ||
unsigned int in_idle; | ||
unsigned long long idle_count; | ||
unsigned long long idle_enter; | ||
unsigned long long idle_time; | ||
}; | ||
|
||
DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | ||
|
||
#endif /* _ASM_S390_CPU_H_ */ |