tempesta icon indicating copy to clipboard operation
tempesta copied to clipboard

Cache current time stamp

Open krizhanovsky opened this issue 1 year ago • 0 comments

Motivation

There are dozens of tfw_current_timestamp() calls around the code, which executes ktime_get_real_ts64(), a relatively heavyweight kernel function. Meantime, Tempesta FW code doesn't require high precise timestamps, so this can be optimized.

Scope

Call the ``ktime_get_real_ts64()` only once per a softirq shot and cache the value in a per-cpu variable.

krizhanovsky avatar Nov 02 '24 21:11 krizhanovsky