Page MenuHomeFreeBSD

zstd: fix benchmarking
ClosedPublic

Authored by mjg on Feb 9 2022, 9:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 8:09 PM
Unknown Object (File)
Sun, Mar 31, 1:00 AM
Unknown Object (File)
Jan 29 2024, 1:32 PM
Unknown Object (File)
Jan 11 2024, 1:00 AM
Unknown Object (File)
Dec 24 2023, 10:29 PM
Unknown Object (File)
Dec 24 2023, 3:26 PM
Unknown Object (File)
Dec 20 2023, 1:28 PM
Unknown Object (File)
Dec 20 2023, 7:45 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.