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)
Fri, May 15, 5:48 AM
Unknown Object (File)
Tue, May 12, 8:01 AM
Unknown Object (File)
Sun, May 10, 4:07 AM
Unknown Object (File)
Fri, May 8, 6:16 PM
Unknown Object (File)
Fri, May 1, 11:38 PM
Unknown Object (File)
Apr 5 2026, 4:39 PM
Unknown Object (File)
Apr 5 2026, 12:44 AM
Unknown Object (File)
Apr 4 2026, 10:12 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.