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)
Oct 8 2023, 2:51 PM
Unknown Object (File)
Feb 23 2017, 10:10 PM
Unknown Object (File)
Feb 6 2017, 12:41 AM
Unknown Object (File)
Oct 12 2016, 7:25 AM
Unknown Object (File)
Oct 12 2016, 7:24 AM
Unknown Object (File)
Jun 4 2016, 1:44 AM
Unknown Object (File)
Feb 17 2016, 1:04 AM
Unknown Object (File)
Feb 13 2016, 4:23 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.