aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/uptime.c
Commit message (Collapse)AuthorAgeFilesLines
* fix cputime overflow in uptime_proc_showMartin Schwidefsky2012-01-251-2/+7
| | | | | | | | | | | | | | commit c3e0ef9a298e028a82ada28101ccd5cf64d209ee upstream. For 32-bit architectures using standard jiffies the idletime calculation in uptime_proc_show will quickly overflow. It takes (2^32 / HZ) seconds of idle-time, or e.g. 12.45 days with no load on a quad-core with HZ=1000. Switch to 64-bit calculations. Cc: Michael Abbott <michael.abbott@diamond.ac.uk> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Fix idle time field in /proc/uptimeMichael Abbott2009-09-241-1/+6
| | | | | | | | | Git commit 79741dd changes idle cputime accounting, but unfortunately the /proc/uptime file hasn't caught up. Here the idle time calculation from /proc/stat is copied over. Signed-off-by: Michael Abbott <michael.abbott@diamond.ac.uk> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* Revert "proc: revert /proc/uptime to ->read_proc hook"Alexey Dobriyan2009-03-311-20/+18
| | | | | | | | This reverts commit 6c87df37dcb9c6c33923707fa5191e0a65874d60. proc files implemented through seq_file do pread(2) now. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* proc: revert /proc/uptime to ->read_proc hookAlexey Dobriyan2008-10-271-18/+20
| | | | | | | | | | | | Turned out some VMware userspace does pread(2) on /proc/uptime, but seqfiles currently don't allow pread() resulting in -ESPIPE. Seqfiles in theory can do pread(), but this can be a long story, so revert to ->read_proc until then. http://bugzilla.kernel.org/show_bug.cgi?id=11856 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* proc: switch /proc/uptime to seq_fileAlexey Dobriyan2008-10-231-0/+43
and move it to fs/proc/uptime.c while I'm at it. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>