Page MenuHomeFreeBSD

zstd: fix benchmarking
ClosedPublic

Authored by mjg on Feb 9 2022, 9:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 3, 10:25 AM
Unknown Object (File)
Thu, Aug 27, 1:34 AM
Unknown Object (File)
Sat, Aug 22, 5:58 PM
Unknown Object (File)
Sun, Aug 9, 1:14 AM
Unknown Object (File)
Thu, Aug 6, 8:48 PM
Unknown Object (File)
Aug 3 2026, 3:56 PM
Unknown Object (File)
Aug 2 2026, 6:05 AM
Unknown Object (File)
Aug 2 2026, 5:46 AM
Subscribers

Details

Summary

buildworld ends up defining the C standard as below C11, in turn zstd decides to use C90 timing primitives which by their own commentary give wrong results in multi-threaded setups.

This fixed speed reporting. See https://lists.freebsd.org/archives/freebsd-current/2021-December/001183.html for more details.

I don't care about the patch, feel free to drop it and fix in a different manner.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Feb 9 2022, 9:33 PM
mjg created this revision.

We should probably also look into importing latest release since 1.5+ provides overall performance improvements.

rew added a subscriber: rew.

not sure if using CSTD=c11 in usr.bin/zstd/Makefile would be acceptable/work here, to avoid touching contrib code.

otherwise, looks good to me.

This revision is now accepted and ready to land.Mar 1 2022, 5:41 PM
cem requested changes to this revision.Mar 1 2022, 5:56 PM

Setting cstd seems strongly preferable vs making upstream updates more difficult.

This revision now requires changes to proceed.Mar 1 2022, 5:56 PM
  • use CSTD=c11

I had no idea about the above var. I tried passing -std=c11 in cflags but that was failing.

This revision is now accepted and ready to land.Mar 1 2022, 6:33 PM
This revision was automatically updated to reflect the committed changes.