Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-06-28 Thread Xie XiuQi
On 2014/5/20 6:35, Luck, Tony wrote: >> Another problem, maybe we should use get_jiffies_64() instead of jiffies >> directly here OR we'll meet wraparound problems on 32bit system. But a >> same problem is that the jiffies_lock is not safe in NMI context... > > To quote Winnie the Pooh - "Bother".

RE: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-19 Thread Luck, Tony
> Another problem, maybe we should use get_jiffies_64() instead of jiffies > directly here OR we'll meet wraparound problems on 32bit system. But a > same problem is that the jiffies_lock is not safe in NMI context... To quote Winnie the Pooh - "Bother". Can someone think of a clever way to get a

Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-18 Thread Xie XiuQi
On 2014/4/9 1:32, Tony Luck wrote: > The "uptime" tracer added in: > commit 8aacf017b065a805d27467843490c976835eb4a5 > tracing: Add "uptime" trace clock that uses jiffies > has wraparound problems when the system has been up more > than 1 hour 11 minutes and 34 seconds. It converts jiffies

Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-16 Thread Steven Rostedt
On Fri, 16 May 2014 17:17:46 + "Luck, Tony" wrote: > Is this function safe to call in every context (including NMI & machine > check)? > [it uses read_seqcount_begin/read_seqcount_retry ... which I *think* is > safe ... but this stuff is tricky, so I'd like some reassurance]. No, read_seqco

RE: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-16 Thread Luck, Tony
> How about get uptime by get_monotonic_boottime() directly, which's > the same as /proc/uptime. I don't know. get_monotonic_boottime() had existed for many releases at the point the uptime trace clock was added - so it was an available choice. Maybe not noticed by Is this function safe to call

Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-16 Thread Shy Shuky
2014-04-09 1:32 GMT+08:00 Tony Luck : > The "uptime" tracer added in: > commit 8aacf017b065a805d27467843490c976835eb4a5 > tracing: Add "uptime" trace clock that uses jiffies > has wraparound problems when the system has been up more > than 1 hour 11 minutes and 34 seconds. It converts jiffi

[PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-05-09 Thread Luck, Tony
The "uptime" tracer added in: commit 8aacf017b065a805d27467843490c976835eb4a5 tracing: Add "uptime" trace clock that uses jiffies has wraparound problems when the system has been up more than 1 hour 11 minutes and 34 seconds. It converts jiffies to nanoseconds using: (u64)jiffies_to

Re: [PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-04-09 Thread Tony Luck
+ if (jl < 4*HZ) { That was lazy ... should be something like: + if (jl < (u64)UINT_MAX * HZ / NSEC_PER_SEC) -Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kern

[PATCH] time: Provide full featured jiffies_to_nsecs() function

2014-04-08 Thread Tony Luck
The "uptime" tracer added in: commit 8aacf017b065a805d27467843490c976835eb4a5 tracing: Add "uptime" trace clock that uses jiffies has wraparound problems when the system has been up more than 1 hour 11 minutes and 34 seconds. It converts jiffies to nanoseconds using: (u64)jiffies_to