tempesta icon indicating copy to clipboard operation
tempesta copied to clipboard

refactor: optimize tfw current timestamp

Open MorganaFuture opened this issue 6 months ago • 1 comments

What Optimize tfw_current_timestamp() to use kernel-level softirq timestamp caching. When in softirq context, use cached timestamp from softirq_current_timestamp() instead of calling expensive ktime_get_real_ts64() directly.

Why Tempesta makes dozens of tfw_current_timestamp() calls per softirq batch, each executing expensive ktime_get_real_ts64(). This optimization leverages kernel-level caching (updated once per softirq batch) to significantly reduce CPU overhead in high-throughput scenarios while maintaining sufficient timestamp precision for Tempesta's use cases Links Kernel patch 2275

MorganaFuture avatar Jun 09 '25 07:06 MorganaFuture

This pull request will be opened after these changes are agreed upon.

MorganaFuture avatar Jun 09 '25 07:06 MorganaFuture