* [PATCH] blktrace: fix comment in blktrace_api.h
@ 2018-03-30 19:32 Souvik Banerjee
2018-03-30 20:17 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Souvik Banerjee @ 2018-03-30 19:32 UTC (permalink / raw)
To: Jens Axboe
Cc: souvik1997, Eric Biggers, Steven Rostedt (VMware),
Philippe Ombredanne, Kate Stewart, Greg Kroah-Hartman, Shaohua Li,
linux-kernel
The `__u64 time` field of the blk_io_trace struct refers to
the time in nanoseconds, not in microseconds. It is set in
__blk_add_trace, which does the following:
t->time = ktime_to_ns(ktime_get());
ktime_to_ns returns ktime_t in nanoseconds, not microseconds.
Signed-off-by: Souvik Banerjee <souvik1997@gmail.com>
---
include/uapi/linux/blktrace_api.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/blktrace_api.h b/include/uapi/linux/blktrace_api.h
index 3c50e07ee833..690621b610e5 100644
--- a/include/uapi/linux/blktrace_api.h
+++ b/include/uapi/linux/blktrace_api.h
@@ -101,7 +101,7 @@ enum blktrace_notify {
struct blk_io_trace {
__u32 magic; /* MAGIC << 8 | version */
__u32 sequence; /* event number */
- __u64 time; /* in microseconds */
+ __u64 time; /* in nanoseconds */
__u64 sector; /* disk offset */
__u32 bytes; /* transfer length */
__u32 action; /* what happened */
--
2.16.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] blktrace: fix comment in blktrace_api.h
2018-03-30 19:32 [PATCH] blktrace: fix comment in blktrace_api.h Souvik Banerjee
@ 2018-03-30 20:17 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-03-30 20:17 UTC (permalink / raw)
To: Souvik Banerjee
Cc: Eric Biggers, Steven Rostedt (VMware), Philippe Ombredanne,
Kate Stewart, Greg Kroah-Hartman, Shaohua Li, linux-kernel
On 3/30/18 1:32 PM, Souvik Banerjee wrote:
> The `__u64 time` field of the blk_io_trace struct refers to
> the time in nanoseconds, not in microseconds. It is set in
> __blk_add_trace, which does the following:
>
> t->time = ktime_to_ns(ktime_get());
>
> ktime_to_ns returns ktime_t in nanoseconds, not microseconds.
Thanks, applied. Back way back when it used to be in microseconds, iirc,
I'm guessing the comment dates to back then.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-30 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-30 19:32 [PATCH] blktrace: fix comment in blktrace_api.h Souvik Banerjee
2018-03-30 20:17 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox