public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	John Stultz <johnstul@us.ibm.com>,
	Tomas Janousek <tjanouse@redhat.com>,
	Tomas Smetana <tsmetana@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] uptime_proc_show: use get_monotonic_boottime()
Date: Mon, 10 Jun 2013 20:33:20 +0200	[thread overview]
Message-ID: <20130610183320.GA14405@redhat.com> (raw)
In-Reply-To: <20130610183300.GA14379@redhat.com>

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>
---
 fs/proc/uptime.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index 9610ac7..0618946 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -20,8 +20,7 @@ static int uptime_proc_show(struct seq_file *m, void *v)
 	for_each_possible_cpu(i)
 		idletime += (__force u64) kcpustat_cpu(i).cpustat[CPUTIME_IDLE];
 
-	do_posix_clock_monotonic_gettime(&uptime);
-	monotonic_to_bootbased(&uptime);
+	get_monotonic_boottime(&uptime);
 	nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC;
 	idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
 	idle.tv_nsec = rem;
-- 
1.5.5.1


  parent reply	other threads:[~2013-06-10 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 18:33 [PATCH 0/3] de_thread() should update ->real_start_time Oleg Nesterov
2013-06-10 18:33 ` [PATCH 1/3] de_thread: mt-exec " Oleg Nesterov
2013-06-10 18:33 ` Oleg Nesterov [this message]
2013-06-10 18:33 ` [PATCH 3/3] do_sysinfo: use get_monotonic_boottime() Oleg Nesterov
2013-06-10 19:48 ` [PATCH 0/3] de_thread() should update ->real_start_time John Stultz
2013-06-11 17:13   ` Oleg Nesterov
2013-06-11 18:14     ` John Stultz
2013-06-11 20:06       ` Oleg Nesterov
2013-06-10 20:18 ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130610183320.GA14405@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tjanouse@redhat.com \
    --cc=tsmetana@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox