From: Ingo Molnar <mingo@elte.hu>
To: Divyesh Shah <dpshah@google.com>
Cc: jaxboe@fusionio.com, peterz@infradead.org, piotr@hosowicz.com,
linux-kernel@vger.kernel.org, vgoyal@redhat.com,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 2/2] Use ktime_get() instead of sched_clock() for blkio cgroup stats.
Date: Sat, 12 Jun 2010 09:18:47 +0200 [thread overview]
Message-ID: <20100612071847.GA29751@elte.hu> (raw)
In-Reply-To: <20100612023457.14850.50439.stgit@austin.mtv.corp.google.com>
* Divyesh Shah <dpshah@google.com> wrote:
> This will take care of the pre-emptive kernel issue and the unbounded
> TSC drift problem. We will lose resolution though in some cases.
> - blkg->stats.start_group_wait_time = sched_clock();
> + blkg->stats.start_group_wait_time = ktime_to_ns(ktime_get());
Ugh!
ktime_get() can have insanely high overhead. Peter has added local_clock(), if
then you should use that and apply checks to make sure the result isnt
negative.
Ingo
next prev parent reply other threads:[~2010-06-12 7:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-12 2:34 [PATCH 1/2] Remove preempt_enable/disable calls around sched_clock() Divyesh Shah
2010-06-12 2:35 ` [PATCH 2/2] Use ktime_get() instead of sched_clock() for blkio cgroup stats Divyesh Shah
2010-06-12 7:18 ` Ingo Molnar [this message]
2010-06-12 15:51 ` Divyesh Shah
2010-06-12 7:19 ` [PATCH 1/2] Remove preempt_enable/disable calls around sched_clock() Ingo Molnar
2010-06-12 15:52 ` Divyesh Shah
2010-06-13 10:01 ` Ingo Molnar
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=20100612071847.GA29751@elte.hu \
--to=mingo@elte.hu \
--cc=dpshah@google.com \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=piotr@hosowicz.com \
--cc=tglx@linutronix.de \
--cc=vgoyal@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;
as well as URLs for NNTP newsgroup(s).