Page MenuHomeFreeBSD

amd64: clean up copyin/copyout
ClosedPublic

Authored by mjg on Sep 22 2018, 11:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 10, 3:02 PM
Unknown Object (File)
Dec 28 2024, 9:57 PM
Unknown Object (File)
Nov 25 2024, 2:29 PM
Unknown Object (File)
Nov 1 2024, 4:05 AM
Unknown Object (File)
Sep 27 2024, 10:04 AM
Unknown Object (File)
Sep 25 2024, 6:08 AM
Unknown Object (File)
Sep 24 2024, 6:35 PM
Unknown Object (File)
Sep 24 2024, 4:16 PM
Subscribers

Details

Summary
  • move the PSL.AC comment to the fault handler
  • stop testing for zero-sized ops. after several minutes of package building there were no copyin calls with zero bytes and very few copyout. the semantic of returning 0 in this case is preserved
  • shorten exit paths by clearing %eax earlier
  • replace xchg with 3 movs. this is what compilers do. a naive benchmark on EPYC suggests about 1% increase in thoughput thanks to this change.
  • remove the uselss movb %cl,%al from copyout. it looks like a leftover from many years ago

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

movb is removed from copyin.

I am curious about the removal of xchg reg,reg.

This revision is now accepted and ready to land.Sep 22 2018, 4:46 PM
This revision was automatically updated to reflect the committed changes.