summaryrefslogtreecommitdiffstats
path: root/fs/proc/uptime.c
Commit message (Collapse)AuthorAgeFilesLines
* fs/proc/uptime.c:uptime_proc_show(): use get_monotonic_boottime()Oleg Nesterov2013-07-031-2/+1
| | | | | | | | | | | | | Change uptime_proc_show() to use get_monotonic_boottime() instead of do_posix_clock_monotonic_gettime() + monotonic_to_bootbased(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Tomas Janousek <tjanouse@redhat.com> Cc: Tomas Smetana <tsmetana@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'sched/core' of ↵Martin Schwidefsky2011-12-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into cputime-tip Conflicts: drivers/cpufreq/cpufreq_conservative.c drivers/cpufreq/cpufreq_ondemand.c drivers/macintosh/rack-meter.c fs/proc/stat.c fs/proc/uptime.c kernel/sched/core.c
| * sched/accounting: Change cpustat fields to an arrayGlauber Costa2011-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa <glommer@parallels.com> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Tuner <pjt@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1322498719-2255-2-git-send-email-glommer@parallels.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | [S390] fix cputime overflow in uptime_proc_showMartin Schwidefsky2011-12-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | 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: stable@vger.kernel.org Cc: Michael Abbott <michael.abbott@diamond.ac.uk> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* | [S390] cputime: add sparse checking and cleanupMartin Schwidefsky2011-12-151-2/+2
|/ | | | | | | | Make cputime_t and cputime64_t nocast to enable sparse checking to detect incorrect use of cputime. Drop the cputime macros for simple scalar operations. The conversion macros are still needed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [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>
OpenPOWER on IntegriCloud