[ovs-dev] [PATCH 1/2] datapath: Fix flow time used computation.

Jesse Gross jesse at nicira.com
Mon Jan 31 23:01:23 UTC 2011


On Mon, Jan 31, 2011 at 2:55 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Jan 31, 2011 at 02:08:40PM -0800, Jesse Gross wrote:
>> The current reporting of flow last used time has two issues that
>> cause it to incorrectly report the system monotonic time when the
>> flow was last used.
>>
>> The first is that it simply converts the stored jiffies value to
>> milliseconds by scaling with a constant.  This does not work because
>> jiffies is not zero based and can wrap around on 32-bit platforms.
>>
>> The second is there is no guarantee that jiffies advances at the
>> same rate as the RTC based monotonic time that userspace uses.
>> A variety of factors can cause differences, including system suspend
>> and clock drift.  These are not too important for relatively short
>> time periods such as the duration of the flow (nor is the flow timing
>> precision of extreme importance).  However, when the time being
>> measured is the duration since system boot (assuming that the above
>> issues had been addressed) the difference can become significant.
>>
>> This addresses both issues by restoring behavior similar to the
>> previous method of computing the flow used time, though in a
>> slightly different form to reflect the needs of the Netlink code.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> Acked-by: Ben Pfaff <blp at nicira.com>

Thanks, I've pushed this series.




More information about the dev mailing list