Page MenuHomeFreeBSD

loader: ip: Do not call getsecs so much
ClosedPublic

Authored by manu on Dec 13 2021, 10:48 AM.
Tags
None
Referenced Files
F112030303: D33408.diff
Tue, Mar 11, 7:50 PM
Unknown Object (File)
Mon, Mar 10, 7:44 AM
Unknown Object (File)
Fri, Feb 28, 11:42 AM
Unknown Object (File)
Sat, Feb 22, 2:30 PM
Unknown Object (File)
Sat, Feb 22, 1:54 PM
Unknown Object (File)
Feb 5 2025, 10:08 AM
Unknown Object (File)
Jan 28 2025, 7:11 PM
Unknown Object (File)
Jan 27 2025, 7:25 PM
Subscribers

Details

Summary

getsecs is very costly, reuse the values we got before.

Fetching a ~30MB kernel with the tftp command use to take ~26 seconds
and now it's ~18 seconds.

MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG

Test Plan
x time-base
+ time-ip-nogetsecs
+-----------------------------------------------------------------------------------------------------------------------------+
| +                                                                                                                           |
| +                                                                                                                           |
| +                                                                                                                           |
| +                                                                                                                           |
|++                                                                                                                           |
|++                                                                                                                           |
|++                                           xxx   x   x x      x                         x  x                              x|
||A                                       |______________M__________A__________________________|                              |
+-----------------------------------------------------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10           104           193           116         128.9     29.856881
+  10            53            54            54          53.7    0.48304589
Difference at 95.0% confidence
	-75.2 +/- 19.8393
	-58.3398% +/- 6.41603%
	(Student's t, pooled s = 21.1148)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable