Page MenuHomeFreeBSD

Move typically true check for static syscall out of syscall_thread_enter/exit functions into an inline.
AbandonedPublic

Authored by mjg on Oct 25 2014, 2:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 11 2025, 11:23 PM
Unknown Object (File)
Mar 13 2025, 5:03 AM
Unknown Object (File)
Feb 22 2025, 8:47 PM
Unknown Object (File)
Feb 20 2025, 6:53 AM
Unknown Object (File)
Feb 16 2025, 2:08 AM
Unknown Object (File)
Feb 14 2025, 12:28 AM
Unknown Object (File)
Feb 13 2025, 2:28 PM
Unknown Object (File)
Nov 30 2024, 8:29 AM
Subscribers
None

Details

Reviewers
jhb
Summary

Move typically true check for static syscall out of syscall_thread_enter/exit functions into an inline.

Prefix original functions with an _.

According to ministat this gives roughly a 4% speedup when calling getuid()
in a loop (syscall_timing benchmark found in tools/tools).

I was considering getting rid of 'td' argument as well as it is unused.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

mjg retitled this revision from to Move typically true check for static syscall out of syscall_thread_enter/exit functions into an inline..
mjg updated this object.
mjg edited the test plan for this revision. (Show Details)
mjg abandoned this revision.EditedOct 13 2017, 8:03 PM

the idea is half-crap - this code still remains in the hot path, even though it can be eliminated. this can be accomplished by providing a extra system call table and a proxy handler installed in the regular one. the proxy handler will inspect regs and whatnot and will get the syscall number + args from there. it can then proceed to do the crappery to safely call the syscall.