cputime: Virtual cputime accounting small cleanups and consolidation
cover cputime: Virtual cputime accounting small cleanups and consolidation
Not sure to which tree this should go. The scheduler one may be. Anyway if you're fine with it, it is pullable at:
git://github.com/fweisbec/linux-dynticks.git
virt-cputime
This is only built tested on the relevant archs.
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Frederic Weisbecker (4):
cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING
sched: Move cputime code to its own file
cputime: Consolidate vtime handling on context switch
s390: Remove leftover account_tick_vtime() header
arch/Kconfig | 3 + arch/ia64/Kconfig | 12 +- arch/ia64/include/asm/switch_to.h | 8 - arch/ia64/kernel/time.c | 4 +- arch/powerpc/include/asm/time.h | 6 - arch/powerpc/kernel/process.c | 3 - arch/powerpc/kernel/time.c | 6 + arch/powerpc/platforms/Kconfig.cputype | 16 +- arch/s390/Kconfig | 5 +- arch/s390/include/asm/switch_to.h | 4 - arch/s390/kernel/vtime.c | 4 +- include/linux/kernel_stat.h | 6 + init/Kconfig | 13 + kernel/sched/Makefile | 2 +- kernel/sched/core.c | 552 +------------------------------- kernel/sched/cputime.c | 497 ++++++++++++++++++++++++++++ kernel/sched/sched.h | 63 ++++ 17 files changed, 600 insertions(+), 604 deletions(-) create mode 100644 kernel/sched/cputime.c
Signature · 1 line
1.7.5.4
PATCH 1/4 cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING
S390, ia64 and powerpc all define their own version of CONFIG_VIRT_CPU_ACCOUNTING. Generalize the config and its description to a single place to avoid duplication.
--- arch/Kconfig | 3 +++ arch/ia64/Kconfig | 12 +----------- arch/powerpc/platforms/Kconfig.cputype | 16 +--------------- arch/s390/Kconfig | 5 ++--- init/Kconfig | 13 +++++++++++++ 5 files changed, 20 insertions(+), 29 deletions(-)
arch/Kconfig +3 -0
@@ -274,4 +274,7 @@ config SECCOMP_FILTER See Documentation/prctl/seccomp_filter.txt for details. +config HAVE_VIRT_CPU_ACCOUNTING + bool + source "kernel/gcov/Kconfig"
arch/ia64/Kconfig +1 -11
@@ -25,6 +25,7 @@ config IA64 select HAVE_GENERIC_HARDIRQS select HAVE_MEMBLOCK select HAVE_MEMBLOCK_NODE_MAP + select HAVE_VIRT_CPU_ACCOUNTING select ARCH_DISCARD_MEMBLOCK select GENERIC_IRQ_PROBE select GENERIC_PENDING_IRQ if SMP
@@ -341,17 +342,6 @@ config FORCE_MAX_ZONEORDER default "17" if HUGETLB_PAGE default "11" -config VIRT_CPU_ACCOUNTING - bool "Deterministic task and CPU time accounting" - default n - help - Select this option to enable more accurate task and CPU time - accounting. This is done by reading a CPU counter on each - kernel entry and exit and on transitions within the kernel - between system, softirq and hardirq state, so there is a - small performance impact. - If in doubt, say N here. - config SMP bool "Symmetric multi-processing support" select USE_GENERIC_SMP_HELPERS
arch/powerpc/platforms/Kconfig.cputype +1 -15
@@ -1,6 +1,7 @@ config PPC64 bool "64-bit kernel" default n + select HAVE_VIRT_CPU_ACCOUNTING help This option selects whether a 32-bit or a 64-bit kernel will be built.
@@ -333,21 +334,6 @@ config PPC_MM_SLICES default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES) default n -config VIRT_CPU_ACCOUNTING - bool "Deterministic task and CPU time accounting" - depends on PPC64 - default y - help - Select this option to enable more accurate task and CPU time - accounting. This is done by reading a CPU counter on each - kernel entry and exit and on transitions within the kernel - between system, softirq and hardirq state, so there is a - small performance impact. This also enables accounting of - stolen time on logically-partitioned systems running on - IBM POWER5-based machines. - - If in doubt, say Y here. - config PPC_HAVE_PMU_SUPPORT bool
arch/s390/Kconfig +2 -3
@@ -49,9 +49,6 @@ config GENERIC_LOCKBREAK config PGSTE def_bool y if KVM -config VIRT_CPU_ACCOUNTING - def_bool y - config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y
@@ -88,6 +85,8 @@ config S390 select HAVE_MEMBLOCK select HAVE_MEMBLOCK_NODE_MAP select HAVE_CMPXCHG_LOCAL + select HAVE_VIRT_CPU_ACCOUNTING + select VIRT_CPU_ACCOUNTING select ARCH_DISCARD_MEMBLOCK select ARCH_INLINE_SPIN_TRYLOCK select ARCH_INLINE_SPIN_TRYLOCK_BH
init/Kconfig +13 -0
@@ -267,6 +267,19 @@ config POSIX_MQUEUE_SYSCTL depends on SYSCTL default y +config VIRT_CPU_ACCOUNTING + bool "Deterministic task and CPU time accounting" + depends on HAVE_VIRT_CPU_ACCOUNTING + default y if PPC64 + help + Select this option to enable more accurate task and CPU time + accounting. This is done by reading a CPU counter on each + kernel entry and exit and on transitions within the kernel + between system, softirq and hardirq state, so there is a + small performance impact. This also enables accounting of + stolen time on logically-partitioned systems running on + IBM POWER5-based machines. + config BSD_PROCESS_ACCT bool "BSD Process Accounting" help
Signature · 1 line
1.7.5.4
PATCH 3/4 cputime: Consolidate vtime handling on context switch
In reply to Frederic WeisbeckerThe archs that implement virtual cputime accounting all flush the cputime of a task when it gets descheduled and sometimes set up some ground initialization for the next task to account its cputime.
These archs all put their own hooks in their context switch callbacks and handle the off-case themselves.
Consolidate this by creating a new account_switch_vtime() callback called in generic code right after a context switch and that these archs must implement to flush the prev task cputime and initialize the next task cputime related state.
--- arch/ia64/include/asm/switch_to.h | 8 -------- arch/ia64/kernel/time.c | 4 ++-- arch/powerpc/include/asm/time.h | 6 ------ arch/powerpc/kernel/process.c | 3 --- arch/powerpc/kernel/time.c | 6 ++++++ arch/s390/include/asm/switch_to.h | 2 -- arch/s390/kernel/vtime.c | 4 ++-- include/linux/kernel_stat.h | 6 ++++++ kernel/sched/core.c | 1 + 9 files changed, 17 insertions(+), 23 deletions(-)
arch/ia64/include/asm/switch_to.h +0 -8
@@ -30,13 +30,6 @@ extern struct task_struct *ia64_switch_to (void *next_task);extern void ia64_save_extra (struct task_struct *task);extern void ia64_load_extra (struct task_struct *task); -#ifdef CONFIG_VIRT_CPU_ACCOUNTING -extern void ia64_account_on_switch (struct task_struct *prev,struct task_struct *next); -# define IA64_ACCOUNT_ON_SWITCH (p,n) ia64_account_on_switch(p,n) -#else -# define IA64_ACCOUNT_ON_SWITCH (p,n) -#endif -#ifdef CONFIG_PERFMON DECLARE_PER_CPU(unsigned long, pfm_syst_info);# define PERFMON_IS_SYSWIDE () (__get_cpu_var(pfm_syst_info) & 0x1)
@@ -49,7 +42,6 @@ extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct || PERFMON_IS_SYSWIDE())#define __switch_to (prev,next,last) do { \ - IA64_ACCOUNT_ON_SWITCH(prev, next); \ if (IA64_HAS_EXTRA_STATE(prev)) \ ia64_save_extra(prev); \ if (IA64_HAS_EXTRA_STATE(next)) \
arch/ia64/kernel/time.c +2 -2
@@ -88,10 +88,10 @@ extern cputime_t cycle_to_cputime(u64 cyc);* accumulated times to the current process, and to prepare accounting on * the next process. */ -void ia64_account_on_switch (struct task_struct *prev,struct task_struct *next) +void account_switch_vtime (struct task_struct *prev) {struct thread_info *pi =task_thread_info (prev); -struct thread_info *ni =task_thread_info (next); +struct thread_info *ni =task_thread_info (current);cputime_t delta_stime, delta_utime;__u64 now;
arch/powerpc/include/asm/time.h +0 -6
@@ -197,12 +197,6 @@ struct cpu_usage { DECLARE_PER_CPU(struct cpu_usage, cpu_usage_array); -#if defined(CONFIG_VIRT_CPU_ACCOUNTING ) -#define account_process_vtime (tsk) account_process_tick(tsk, 0) -#else -#define account_process_vtime (tsk) do { } while (0) -#endif -extern void secondary_cpu_time_init (void );DECLARE_PER_CPU (u64, decrementers_next_tb);
arch/powerpc/kernel/process.c +0 -3
@@ -514,9 +514,6 @@ struct task_struct *__switch_to(struct task_struct *prev,local_irq_save (flags); -account_system_vtime (current); -account_process_vtime (current); -/* * We can't take a PMU exception inside _switch() since there is a * window where the kernel stack SLB and the kernel stack are out
arch/powerpc/kernel/time.c +6 -0
@@ -366,6 +366,12 @@ void account_process_tick(struct task_struct *tsk, int user_tick) account_user_time(tsk, utime, utimescaled); } +void account_switch_vtime (struct task_struct *prev) +{ +account_system_vtime (prev); +account_process_tick (prev,0 ); +} +#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ #define calc_cputime_factors ()#endif
arch/s390/include/asm/switch_to.h +0 -2
@@ -89,12 +89,10 @@ static inline void restore_access_regs(unsigned int *acrs) prev =__switch_to (prev,next); \ } while (0) -extern void account_vtime(struct task_struct *, struct task_struct *); extern void account_tick_vtime(struct task_struct *);#define finish_arch_switch (prev) do { \ set_fs(current->thread.mm_segment); \ - account_vtime(prev, current); \ } while (0)#endif /* __ASM_SWITCH_TO_H */
arch/s390/kernel/vtime.c +2 -2
@@ -86,7 +86,7 @@ static void do_account_vtime(struct task_struct *tsk, int hardirq_offset) } } -void account_vtime (struct task_struct *prev,struct task_struct *next) +void account_switch_vtime (struct task_struct *prev) {struct thread_info *ti;
@@ -94,7 +94,7 @@ void account_vtime(struct task_struct *prev, struct task_struct *next) ti =task_thread_info (prev); ti->user_timer = S390_lowcore.user_timer; ti->system_timer = S390_lowcore.system_timer; - ti =task_thread_info (next); + ti =task_thread_info (current); S390_lowcore.user_timer = ti->user_timer; S390_lowcore.system_timer = ti->system_timer; }
include/linux/kernel_stat.h +6 -0
@@ -130,4 +130,10 @@ extern void account_process_tick(struct task_struct *, int user);extern void account_steal_ticks (unsigned long ticks);extern void account_idle_ticks (unsigned long ticks); +#ifdef CONFIG_VIRT_CPU_ACCOUNTING +extern void account_switch_vtime (struct task_struct *prev); +#else +static inline void account_switch_vtime (struct task_struct *prev) { } +#endif +#endif /* _LINUX_KERNEL_STAT_H */
kernel/sched/core.c +1 -0
@@ -1796,6 +1796,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)* Manfred Spraul <[email protected]> */ prev_state = prev->state; +account_switch_vtime (prev);finish_arch_switch (prev);#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSWlocal_irq_disable ();
Signature · 1 line
1.7.5.4
PATCH 4/4 s390: Remove leftover account_tick_vtime() header
In reply to Frederic WeisbeckerThe function doesn't seem to exist anymore.
--- arch/s390/include/asm/switch_to.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/s390/include/asm/switch_to.h +0 -2
@@ -89,8 +89,6 @@ static inline void restore_access_regs(unsigned int *acrs) prev =__switch_to (prev,next); \ } while (0) -extern void account_tick_vtime(struct task_struct *); -#define finish_arch_switch (prev) do { \ set_fs(current->thread.mm_segment); \ } while (0)
Signature · 1 line
1.7.5.4
PATCH 2/4 sched: Move cputime code to its own file
In reply to Frederic WeisbeckerExtract cputime code from the giant sched/core.c and put it in its own file. This make it easier to deal with this particular area and de-bloat a bit more core.c
--- kernel/sched/Makefile | 2 +- kernel/sched/core.c | 551 +----------------------------------------------- kernel/sched/cputime.c | 497 +++++++++++++++++++++++++++++++++++++++++++ kernel/sched/sched.h | 63 ++++++ 4 files changed, 563 insertions(+), 550 deletions(-) create mode 100644 kernel/sched/cputime.c
kernel/sched/Makefile +1 -1
@@ -11,7 +11,7 @@ ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer endif -obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o +obj-y += core.o clock.o cputime.o idle_task.o fair.o rt.o stop_task.o obj-$(CONFIG_SMP) += cpupri.o obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o obj-$(CONFIG_SCHEDSTATS) += stats.o
kernel/sched/core.c +2 -549
575 lines not on this page · raw message
kernel/sched/cputime.c new file +497 -0
497 lines not on this page · raw message
kernel/sched/sched.h +63 -0
79 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Quoted 1 line
This is only built tested on the relevant archs.
Built and run on ia64 ... seems to work (but I don't have any tests that really show the difference between having this turned on/off :-( )
-Tony
Peter Zijlstra
maintainerQuoted 5 lines · Frederic Weisbecker
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Yes.. so s390,ia64 use thread_info, ppc uses their paca (arch private precursor to per-cpu data).
So I understand why s390,ia64 want the sched hook, but I don't see why ppc would need it, their account_process_tick() can fold whatever they need on the tick.
So I think reworking s390,ia64 to use per-cpu storage should get rid of this switch hook altogether.
Now everybody using VIRT_CPU_ACCOUNTING has the syscall/__irq_{enter,exit} hooks and uses 64bit cputime_t.
IRQ_TIME_ACCOUNTING only has the __irq_{enter,exit} hook and uses unsigned long cputime_t, it adds cputime_one_jiffy every tick when the per-cpu counter is ahead of the cputime.
We could merge both and do away with the 64bit cputime thing by keeping a (2nd) per-cpu kernel_cpustat which we fill with optional syscall/irq hooks and have account_process_tick() first check if any of the fine-grained fields overflow and if not, fall back to the regular tick accounting (much like an extended irqtime_account_process_tick).
This would merge the fine-grain and tick based code-paths and do away with the whole cputime_t mess, it would also merge the VIRT and IRQ paths and make Frederic's optional syscall accounting trivial.
Or am I missing something obvious here? -- its late after all.
I'll try and write some code tomorrow.
2012/6/21 Peter Zijlstra <[email protected]>:
Quoted 6 lines · Frederic Weisbecker
Quoted 5 lines
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Quoted 6 lines
Yes.. so s390,ia64 use
thread_info, ppc uses their paca (arch private precursor to per-cpu data).So I understand why s390,ia64 want the sched hook, but I don't see why ppc would need it, their
account_process_tick()can fold whatever they need on the tick.
I think in any case you need to flush the time on a descheduling task otherwise its pending time will be accounted later to the next task when it receives an irq.
So I fear we still need that sched switch hook even with per cpu data. This may be a simple account_system_vtime() call.
Quoted 19 lines
So I think reworking s390,ia64 to use per-cpu storage should get rid of this switch hook altogether.
Now everybody using
VIRT_CPU_ACCOUNTINGhas the syscall/__irq_{enter,exit} hooks and uses 64bitcputime_t.
IRQ_TIME_ACCOUNTINGonly has the __irq_{enter,exit} hook and uses unsigned longcputime_t, it addscputime_one_jiffyevery tick when the per-cpu counter is ahead of the cputime.We could merge both and do away with the 64bit cputime thing by keeping a (2nd) per-cpu
kernel_cpustatwhich we fill with optional syscall/irq hooks and haveaccount_process_tick()first check if any of the fine-grained fields overflow and if not, fall back to the regular tick accounting (much like an extendedirqtime_account_process_tick).
Quoted 5 lines
This would merge the fine-grain and tick based code-paths and do away with the whole
cputime_tmess, it would also merge the VIRT and IRQ paths and make Frederic's optional syscall accounting trivial.Or am I missing something obvious here? -- its late after all.
No that looks pretty sensible.
Quoted 1 line
I'll try and write some code tomorrow.
Thanks!
Quoted 9 lines · On Thu, 21 Jun 2012 02:46:29 +0200 Frederic Weisbecker <[email protected]>…
2012/6/21 Peter Zijlstra <[email protected]>:
Quoted 8 lines · Frederic Weisbecker
Quoted 5 lines
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Yes.. so s390,ia64 use
thread_info, ppc uses their paca (arch private precursor to per-cpu data).
s390 uses the prefix page / lowcore to accumulate some accounting information. Which basically is per-cpu data with the advantage that it is accessible with at address 0-8191 for each cpu. The entry code does not have to load a pointer to get to that page, I would prefer NOT to use per-cpu data here.
Quoted 10 lines
Quoted 3 lines
So I understand why s390,ia64 want the sched hook, but I don't see why ppc would need it, their
account_process_tick()can fold whatever they need on the tick.I think in any case you need to flush the time on a descheduling task otherwise its pending time will be accounted later to the next task when it receives an irq.
So I fear we still need that sched switch hook even with per cpu data. This may be a simple
account_system_vtime()call.
Indeed, the scheduler hook is needed to add the accumulated values to the correct task.
Quoted 2 lines
Quoted 2 lines
So I think reworking s390,ia64 to use per-cpu storage should get rid of this switch hook altogether.
If we get rid of the switch hook then the quality of the accounting numbers will get significantly worse. Think of the scenario of a long running background process and a task that repeatedly wakes up for a very short time. Without the scheduler hook chances are good that the background task is accounted all the accumulated user time.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Peter Zijlstra
maintainerQuoted 10 lines · Frederic Weisbecker
Quoted 3 lines
So I understand why s390,ia64 want the sched hook, but I don't see why ppc would need it, their
account_process_tick()can fold whatever they need on the tick.I think in any case you need to flush the time on a descheduling task otherwise its pending time will be accounted later to the next task when it receives an irq.
So I fear we still need that sched switch hook even with per cpu data. This may be a simple
account_system_vtime()call.
Did I miss a per-task something in there?
Peter Zijlstra
maintainerQuoted 5 lines · Peter Zijlstra
Quoted 4 lines · Frederic Weisbecker
Quoted 3 lines
So I understand why s390,ia64 want the sched hook, but I don't see why ppc would need it, their
account_process_tick()can fold whatever they need on the tick.
Quoted 8 lines
Quoted 6 lines
I think in any case you need to flush the time on a descheduling task otherwise its pending time will be accounted later to the next task when it receives an irq.
So I fear we still need that sched switch hook even with per cpu data. This may be a simple
account_system_vtime()call.Did I miss a per-task something in there?
Gah yeah.. I was staring too hard at the arch code and missed the task accounting in the core code.
OK, so that switch hook stays :-)
Peter Zijlstra
maintainerQuoted 10 lines · Martin Schwidefsky
Quoted 7 lines · On Thu, 21 Jun 2012 02:46:29 +0200 Frederic Weisbecker <[email protected]>…
2012/6/21 Peter Zijlstra <[email protected]>:
Quoted 6 lines · Frederic Weisbecker
Quoted 5 lines
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Yes.. so s390,ia64 use
thread_info, ppc uses their paca (arch private precursor to per-cpu data).s390 uses the prefix page / lowcore to accumulate some accounting information. Which basically is per-cpu data with the advantage that it is accessible with at address 0-8191 for each cpu. The entry code does not have to load a pointer to get to that page, I would prefer NOT to use per-cpu data here.
Yeah, same for ppc and their paca, I just meant to put the data in per-cpu (your lowcore and ppc's paca qualify) storage instead of per-task.
But seeing as I completely overlooked the per-task accounting this doesn't matter anyway.
There being the per-task accounting also completely wrecks the proposal I outlined. That only works if its only per-cpu accounting.
The alternative is going full 64bit ns and having the tick fallback do TICK_NSEC increments. 32bit args that don't do VIRT_TIME or IRQ_TIME won't like that though :/
So yeah, I did miss something obvious.. no cookies for me.
Quoted 26 lines · Peter Zijlstra
Quoted 10 lines · Martin Schwidefsky
Quoted 7 lines · On Thu, 21 Jun 2012 02:46:29 +0200 Frederic Weisbecker <[email protected]>…
2012/6/21 Peter Zijlstra <[email protected]>:
Quoted 6 lines · Frederic Weisbecker
Quoted 5 lines
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Yes.. so s390,ia64 use
thread_info, ppc uses their paca (arch private precursor to per-cpu data).s390 uses the prefix page / lowcore to accumulate some accounting information. Which basically is per-cpu data with the advantage that it is accessible with at address 0-8191 for each cpu. The entry code does not have to load a pointer to get to that page, I would prefer NOT to use per-cpu data here.
Yeah, same for ppc and their paca, I just meant to put the data in per-cpu (your lowcore and ppc's paca qualify) storage instead of per-task.
But seeing as I completely overlooked the per-task accounting this doesn't matter anyway.
Quoted 8 lines
There being the per-task accounting also completely wrecks the proposal I outlined. That only works if its only per-cpu accounting.
The alternative is going full 64bit ns and having the tick fallback do
TICK_NSECincrements. 32bit args that don't doVIRT_TIMEorIRQ_TIMEwon't like that though :/So yeah, I did miss something obvious.. no cookies for me.
Yeah but the idea of a dynamic switching between tick based accounting and virtual based one (account_system_vtime()) is still valuable to me.
That of course only makes sense if the arch uses some kind of "on-demand" virtual accounting. Like using TIF flags for syscall slow path and jump labels for exception hooks. Although in the longer term we should rather hook on the syscall fastpath, but you get the idea.
How does that sound?
Another way would be to make the adaptive tickless thing depend on the traditional CONFIG_VIRT_CPU_TIME. So it's simply enabled all the time and we don't care. But we need syscalls/exceptions hooks for RCU anyway, which is why I think an on-demand thing could make sense because both RCU and vtime could use these on-demand hooks.
Quoted 5 lines · Frederic Weisbecker
Not sure to which tree this should go. The scheduler one may be. Anyway if you're fine with it, it is pullable at:
git://github.com/fweisbec/linux-dynticks.git
virt-cputime
Ping. Are you guys fine with the patchset?
Quoted 37 lines
This is only built tested on the relevant archs.
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Frederic Weisbecker (4):
cputime: GeneralizeCONFIG_VIRT_CPU_ACCOUNTING
sched: Move cputime code to its own file
cputime: Consolidate vtime handling on context switch
s390: Remove leftoveraccount_tick_vtime()headerarch/Kconfig | 3 + arch/ia64/Kconfig | 12 +- arch/ia64/include/asm/switch_to.h | 8 - arch/ia64/kernel/time.c | 4 +- arch/powerpc/include/asm/time.h | 6 - arch/powerpc/kernel/process.c | 3 - arch/powerpc/kernel/time.c | 6 + arch/powerpc/platforms/Kconfig.cputype | 16 +- arch/s390/Kconfig | 5 +- arch/s390/include/asm/switch_to.h | 4 - arch/s390/kernel/vtime.c | 4 +- include/linux/kernel_stat.h | 6 + init/Kconfig | 13 + kernel/sched/Makefile | 2 +- kernel/sched/core.c | 552 +------------------------------- kernel/sched/cputime.c | 497 ++++++++++++++++++++++++++++ kernel/sched/sched.h | 63 ++++ 17 files changed, 600 insertions(+), 604 deletions(-) create mode 100644 kernel/sched/cputime.cSignature · 1 line
1.7.5.4
Quoted 8 lines · Frederic Weisbecker
Quoted 5 lines · Frederic Weisbecker
Not sure to which tree this should go. The scheduler one may be. Anyway if you're fine with it, it is pullable at:
git://github.com/fweisbec/linux-dynticks.git
virt-cputimePing. Are you guys fine with the patchset?
Missed it somewhat. I'll have a look today.
(Poke me on IRC with a stick if you don't hear from me in time)
Cheers,
Ben.
Quoted 37 lines
Quoted 37 lines
This is only built tested on the relevant archs.
I wish we could do more vtime cputime accounting consolidation but archs do the things pretty differently although I bet the behaviour could be more unified.
Frederic Weisbecker (4):
cputime: GeneralizeCONFIG_VIRT_CPU_ACCOUNTING
sched: Move cputime code to its own file
cputime: Consolidate vtime handling on context switch
s390: Remove leftoveraccount_tick_vtime()headerarch/Kconfig | 3 + arch/ia64/Kconfig | 12 +- arch/ia64/include/asm/switch_to.h | 8 - arch/ia64/kernel/time.c | 4 +- arch/powerpc/include/asm/time.h | 6 - arch/powerpc/kernel/process.c | 3 - arch/powerpc/kernel/time.c | 6 + arch/powerpc/platforms/Kconfig.cputype | 16 +- arch/s390/Kconfig | 5 +- arch/s390/include/asm/switch_to.h | 4 - arch/s390/kernel/vtime.c | 4 +- include/linux/kernel_stat.h | 6 + init/Kconfig | 13 + kernel/sched/Makefile | 2 +- kernel/sched/core.c | 552 +------------------------------- kernel/sched/cputime.c | 497 ++++++++++++++++++++++++++++ kernel/sched/sched.h | 63 ++++ 17 files changed, 600 insertions(+), 604 deletions(-) create mode 100644 kernel/sched/cputime.cSignature · 1 line
1.7.5.4
2012/7/9 Frederic Weisbecker <[email protected]>:
Quoted 8 lines · Frederic Weisbecker
Quoted 5 lines
Not sure to which tree this should go. The scheduler one may be. Anyway if you're fine with it, it is pullable at:
git://github.com/fweisbec/linux-dynticks.git
virt-cputimePing. Are you guys fine with the patchset?
Re-ping :)