lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA93ih0Yr81Ua+Obinvcra8PdKY_fee=xq3gkM6zwyr_F-iqsA@mail.gmail.com>
Date:   Sat, 3 Sep 2016 00:54:13 +0900
From:   Masami Hiramatsu <masami.hiramatsu@...aro.org>
To:     Binoy Jayan <binoy.jayan@...aro.org>
Cc:     "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Daniel Wagner <daniel.wagner@...-carit.de>,
        Arnd Bergmann <arnd@...db.de>,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/3] tracing: Histogram for missed timer offsets

2016-09-02 21:41 GMT+09:00 Binoy Jayan <binoy.jayan@...aro.org>:
> On 30 August 2016 at 16:20, Masami Hiramatsu
> <masami.hiramatsu@...aro.org> wrote:
>> Hi Binoy,
>>>
>>> +static inline void trace_latency_hrtimer_mark_ts(struct hrtimer *timer,
>>> +                                        struct hrtimer_clock_base *new_base,
>>> +                                        ktime_t tim)
>>> +{
>>> +#if defined(CONFIG_PREEMPT_TRACER) || defined(CONFIG_IRQSOFF_TRACER)
>>> +       if (trace_latency_hrtimer_interrupt_enabled()) {
>>
>> You would better use unlikely() here.
>>
>>> +               ktime_t now = new_base->get_time();
>>> +
>>> +               if (ktime_to_ns(tim) < ktime_to_ns(now))
>>
>> Wouldn't we need to consider the case of wrap around?
>>
>>> +                       timer->praecox = now;
>>> +               else
>>> +                       timer->praecox = ktime_set(0, 0);
>>> +       }
>>> +#endif
>>> +}
>
> Hi Masami,
>
> I always see these values to be relative and not absolute time. I
> found 'praecox' to be always zero during test.
> What do you think.

Ah, right. Since "tim" is expire time (timer target), that should
always be "now + x"
(x is enough larger than how long setting the hrtimer takes). Or,
hrtimer expires
before finished to set. :)

Thank you,
-- 
Masami Hiramatsu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ