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)
Sun, Apr 5, 4:39 PM
Unknown Object (File)
Sun, Apr 5, 12:44 AM
Unknown Object (File)
Sat, Apr 4, 10:12 PM
Unknown Object (File)
Sat, Apr 4, 1:12 PM
Unknown Object (File)
Wed, Apr 1, 1:27 AM
Unknown Object (File)
Mon, Mar 30, 12:59 AM
Unknown Object (File)
Mon, Mar 23, 11:30 PM
Unknown Object (File)
Mar 21 2026, 10:48 PM
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.