The patch titled signals: make siginfo_t si_utime + si_sstime report times in USER_HZ, not HZ has been added to the -mm tree. Its filename is signals-make-siginfo_t-si_utime-si_sstime-report-times-in-user_hz-not-hz.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: signals: make siginfo_t si_utime + si_sstime report times in USER_HZ, not HZ From: "Michael Kerrisk" <mtk.manpages@xxxxxxxxxxxxxx> In the switch to configurable HZ in 2.6, the treatment of the si_utime and si_stime fields that are exposed to userland via the siginfo structure looks to have been botched. As things stand, these fields report times in units of HZ, so that userland gets information that varies depending on the HZ that the kernel was configured with. This patch changes the reported values to use USER_HZ units. Signed-off-by: Michael Kerrisk <mtk.manpages@xxxxxxxxx> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Roland McGrath <roland@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/signal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff -puN kernel/signal.c~signals-make-siginfo_t-si_utime-si_sstime-report-times-in-user_hz-not-hz kernel/signal.c --- a/kernel/signal.c~signals-make-siginfo_t-si_utime-si_sstime-report-times-in-user_hz-not-hz +++ a/kernel/signal.c @@ -1370,10 +1370,9 @@ void do_notify_parent(struct task_struct info.si_uid = tsk->uid; - /* FIXME: find out whether or not this is supposed to be c*time. */ - info.si_utime = cputime_to_jiffies(cputime_add(tsk->utime, + info.si_utime = cputime_to_clock_t(cputime_add(tsk->utime, tsk->signal->utime)); - info.si_stime = cputime_to_jiffies(cputime_add(tsk->stime, + info.si_stime = cputime_to_clock_t(cputime_add(tsk->stime, tsk->signal->stime)); info.si_status = tsk->exit_code & 0x7f; @@ -1441,9 +1440,8 @@ static void do_notify_parent_cldstop(str info.si_uid = tsk->uid; - /* FIXME: find out whether or not this is supposed to be c*time. */ - info.si_utime = cputime_to_jiffies(tsk->utime); - info.si_stime = cputime_to_jiffies(tsk->stime); + info.si_utime = cputime_to_clock_t(tsk->utime); + info.si_stime = cputime_to_clock_t(tsk->stime); info.si_code = why; switch (why) { _ Patches currently in -mm which might be from mtk.manpages@xxxxxxxxxxxxxx are vfs-utimensat-ignore-tv_sec-if-tv_nsec-==-utime_omit-or-utime_now.patch vfs-utimensat-be-consistent-with-utime-for-immutable-and-append-only-files.patch vfs-utimensat-fix-error-checking-for-utime_nowutime_omit-case.patch vfs-utimensat-fix-write-access-check-for-futimens.patch huge-page-private-reservation-review-cleanups.patch huge-page-private-reservation-review-cleanups-fix.patch mm-record-map_noreserve-status-on-vmas-and-fix-small-page-mprotect-reservations.patch hugetlb-move-reservation-region-support-earlier.patch hugetlb-allow-huge-page-mappings-to-be-created-without-reservations.patch hugetlb-allow-huge-page-mappings-to-be-created-without-reservations-cleanups.patch flag-parameters-socket-and-socketpair.patch flag-parameters-socket-and-socketpair-mips-fix.patch flag-parameters-paccept.patch flag-parameters-paccept-fix.patch flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock.patch flag-parameters-paccept-flag-parameters-paccept-w-out-set_restore_sigmask.patch flag-parameters-paccept-sys_ni.patch flag-parameters-anon_inode_getfd-extension.patch flag-parameters-anon_inode_getfd-extension-fix.patch flag-parameters-signalfd.patch flag-parameters-signalfd-fix.patch flag-parameters-eventfd.patch flag-parameters-eventfd-fix.patch flag-parameters-timerfd_create.patch flag-parameters-epoll_create.patch flag-parameters-dup2.patch flag-parameters-pipe.patch flag-parameters-inotify_init.patch flag-parameters-inotify_init-fix.patch flag-parametersi-nonblock-in-anon_inode_getfd.patch flag-parameters-nonblock-in-socket-and-socketpair.patch flag-parameters-nonblock-in-signalfd.patch flag-parameters-nonblock-in-eventfd.patch flag-parameters-nonblock-in-timerfd_create.patch flag-parameters-nonblock-in-pipe.patch flag-parameters-nonblock-in-inotify_init.patch flag-parameters-check-magic-constants.patch flag-parameters-check-magic-constants-alpha.patch flag-parameters-add-on-remove-epoll_create-size-param.patch signals-make-siginfo_t-si_utime-si_sstime-report-times-in-user_hz-not-hz.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