The patch titled Use portable cputime API in __delayacct_add_tsk() has been removed from the -mm tree. Its filename is per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface-use-portable-cputime-api-in-__delayacct_add_tsk.patch This patch was dropped because it was folded into per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface.patch ------------------------------------------------------ Subject: Use portable cputime API in __delayacct_add_tsk() From: Balbir Singh <balbir@xxxxxxxxxx> Hi, Andrew, While testing on ppc64, I found that taskstats could return incorrect data. The same code worked fine on x86. Thanks, Balbir Singh, Linux Technology Center, IBM Software Labs Description of the patch ------------------------ tsk->utime and tsk->stime are of type cputime_t. Explicitly converting from cputime to nanoseconds does not work on all platforms. Use the cputime API for conversion. This makes the code more portable and returns correct data on ppc64. This patch has been tested on x86 and ppc64. Signed-off-by: Balbir Singh <balbir@xxxxxxxxxx> Cc: Shailabh Nagar <nagar@xxxxxxxxxx> Cc: Jes Sorensen <jes@xxxxxxx> Cc: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx> Cc: Erich Focht <efocht@xxxxxxxxxx> Cc: Levent Serinol <lserinol@xxxxxxxxx> Cc: Jay Lan <jlan@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/delayacct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN kernel/delayacct.c~per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface-use-portable-cputime-api-in-__delayacct_add_tsk kernel/delayacct.c --- a/kernel/delayacct.c~per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface-use-portable-cputime-api-in-__delayacct_add_tsk +++ a/kernel/delayacct.c @@ -115,7 +115,8 @@ int __delayacct_add_tsk(struct taskstats unsigned long t1,t2,t3; tmp = (s64)d->cpu_run_real_total; - tmp += (u64)(tsk->utime + tsk->stime) * TICK_NSEC; + cputime_to_timespec(tsk->utime + tsk->stime, &ts); + tmp += timespec_to_ns(&ts); d->cpu_run_real_total = (tmp < (s64)d->cpu_run_real_total) ? 0 : tmp; /* _ Patches currently in -mm which might be from balbir@xxxxxxxxxx are origin.patch per-task-delay-accounting-setup.patch per-task-delay-accounting-setup-fix-1.patch per-task-delay-accounting-setup-fix-2.patch per-task-delay-accounting-sync-block-i-o-and-swapin-delay-collection.patch per-task-delay-accounting-sync-block-i-o-and-swapin-delay-collection-fix-1.patch per-task-delay-accounting-cpu-delay-collection-via-schedstats.patch per-task-delay-accounting-cpu-delay-collection-via-schedstats-fix-1.patch per-task-delay-accounting-utilities-for-genetlink-usage.patch per-task-delay-accounting-taskstats-interface.patch per-task-delay-accounting-taskstats-interface-fix-1.patch per-task-delay-accounting-taskstats-interface-fix-2.patch per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface.patch per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface-use-portable-cputime-api-in-__delayacct_add_tsk.patch per-task-delay-accounting-delay-accounting-usage-of-taskstats-interface-fix-return-value-of-delayacct_add_tsk.patch revised-locking-for-taskstats-interface.patch per-task-delay-accounting-documentation.patch per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays.patch per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays-warning-fix.patch task-watchers-register-per-task-delay-accounting.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html