forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s390/vtimer: rework virtual timer interface
The current virtual timer interface is inherently per-cpu and hard to use. The sole user of the interface is appldata which uses it to execute a function after a specific amount of cputime has been used over all cpus. Rework the virtual timer interface to hook into the cputime accounting. This makes the interface independent from the CPU timer interrupts, and makes the virtual timers global as opposed to per-cpu. Overall the code is greatly simplified. The downside is that the accuracy is not as good as the original implementation, but it is still good enough for appldata. Reviewed-by: Jan Glauber <jang@linux.vnet.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
- Loading branch information
Martin Schwidefsky
committed
Jul 20, 2012
1 parent
921486b
commit 27f6b41
Showing
13 changed files
with
222 additions
and
472 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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
/* | ||
* Copyright IBM Corp. 2003, 2012 | ||
* Virtual CPU timer | ||
* | ||
* Author(s): Jan Glauber <jan.glauber@de.ibm.com> | ||
*/ | ||
|
||
#ifndef _ASM_S390_TIMER_H | ||
#define _ASM_S390_TIMER_H | ||
|
||
#define VTIMER_MAX_SLICE (0x7fffffffffffffffULL) | ||
|
||
struct vtimer_list { | ||
struct list_head entry; | ||
u64 expires; | ||
u64 interval; | ||
void (*function)(unsigned long); | ||
unsigned long data; | ||
}; | ||
|
||
extern void init_virt_timer(struct vtimer_list *timer); | ||
extern void add_virt_timer(struct vtimer_list *timer); | ||
extern void add_virt_timer_periodic(struct vtimer_list *timer); | ||
extern int mod_virt_timer(struct vtimer_list *timer, u64 expires); | ||
extern int mod_virt_timer_periodic(struct vtimer_list *timer, u64 expires); | ||
extern int del_virt_timer(struct vtimer_list *timer); | ||
|
||
extern void init_cpu_vtimer(void); | ||
extern void vtime_init(void); | ||
|
||
extern void vtime_stop_cpu(void); | ||
|
||
#endif /* _ASM_S390_TIMER_H */ |
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
Oops, something went wrong.