Page MenuHomeFreeBSD

amd64: clean up copyin/copyout
ClosedPublic

Authored by mjg on Sep 22 2018, 11:45 AM.
Tags
None
Referenced Files
F157912754: D17286.id48520.diff
Tue, May 26, 10:30 AM
Unknown Object (File)
Tue, May 5, 8:29 PM
Unknown Object (File)
Tue, May 5, 8:00 PM
Unknown Object (File)
Sun, May 3, 4:51 PM
Unknown Object (File)
Apr 23 2026, 12:09 PM
Unknown Object (File)
Apr 21 2026, 8:58 AM
Unknown Object (File)
Apr 12 2026, 1:34 AM
Unknown Object (File)
Apr 11 2026, 1:13 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

Lint
Lint Skipped
Unit
Tests Skipped

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.