The Linux 7.0 kernel code base has recently undergone significant changes that have been accepted. These changes were implemented to improve the processing of incoming UDP packets in a 100-gigabit network. Through stress testing, it was found that the optimizations allowed for a 12% increase in performance. The key to this improvement was the manual inlining of 2 functions within the codebase.
One of the functions, timecounter_cyc2time(), plays a crucial role in modern protocols as it determines the arrival time of each incoming packet. This function can be called more than 100 million times per second on a busy server. Despite attempts by automatic optimization techniques like FDO, LTO, and PGO, these hot code segments were initially overlooked. This was likely due to the network card drivers being provided as separate modules.
By manually inlining the necessary function, developers were able to achieve a significant performance boost. This adjustment highlights the importance of manual intervention in certain cases where automated optimization processes may fall short.