diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2008-05-19 09:13:44 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-05-27 18:11:42 -0400 |
commit | 00d21d82b8a9e290286e09d8eedc20bfc33b0eee (patch) | |
tree | ed5b32a197ab4f7c8df059cb451b299c40a69ee9 /include | |
parent | 85cbc503787d577c215f9540c57294e1ec799144 (diff) |
[IA64] pvops: add to hooks, pv_time_ops, for steal time accounting.
Introduce pv_time_ops which adds hook to steal time accounting.
On virtualized environment, cpus are shared by many guests and
steal time is the time which is used for other guests.
On virtualized environtment, streal time should be accounted.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/paravirt.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-ia64/paravirt.h b/include/asm-ia64/paravirt.h index ee15646b6d66..1b4df129f579 100644 --- a/include/asm-ia64/paravirt.h +++ b/include/asm-ia64/paravirt.h | |||
@@ -200,6 +200,35 @@ ia64_resend_irq(unsigned int vector) | |||
200 | pv_irq_ops.resend_irq(vector); | 200 | pv_irq_ops.resend_irq(vector); |
201 | } | 201 | } |
202 | 202 | ||
203 | /****************************************************************************** | ||
204 | * replacement of time operations. | ||
205 | */ | ||
206 | |||
207 | extern struct itc_jitter_data_t itc_jitter_data; | ||
208 | extern volatile int time_keeper_id; | ||
209 | |||
210 | struct pv_time_ops { | ||
211 | void (*init_missing_ticks_accounting)(int cpu); | ||
212 | int (*do_steal_accounting)(unsigned long *new_itm); | ||
213 | |||
214 | void (*clocksource_resume)(void); | ||
215 | }; | ||
216 | |||
217 | extern struct pv_time_ops pv_time_ops; | ||
218 | |||
219 | static inline void | ||
220 | paravirt_init_missing_ticks_accounting(int cpu) | ||
221 | { | ||
222 | if (pv_time_ops.init_missing_ticks_accounting) | ||
223 | pv_time_ops.init_missing_ticks_accounting(cpu); | ||
224 | } | ||
225 | |||
226 | static inline int | ||
227 | paravirt_do_steal_accounting(unsigned long *new_itm) | ||
228 | { | ||
229 | return pv_time_ops.do_steal_accounting(new_itm); | ||
230 | } | ||
231 | |||
203 | #endif /* !__ASSEMBLY__ */ | 232 | #endif /* !__ASSEMBLY__ */ |
204 | 233 | ||
205 | #else | 234 | #else |
@@ -215,6 +244,9 @@ ia64_resend_irq(unsigned int vector) | |||
215 | #define paravirt_arch_setup_nomca() 0 | 244 | #define paravirt_arch_setup_nomca() 0 |
216 | #define paravirt_post_smp_prepare_boot_cpu() do { } while (0) | 245 | #define paravirt_post_smp_prepare_boot_cpu() do { } while (0) |
217 | 246 | ||
247 | #define paravirt_init_missing_ticks_accounting(cpu) do { } while (0) | ||
248 | #define paravirt_do_steal_accounting(new_itm) 0 | ||
249 | |||
218 | #endif /* __ASSEMBLY__ */ | 250 | #endif /* __ASSEMBLY__ */ |
219 | 251 | ||
220 | 252 | ||