Page MenuHomeFreeBSD

zstd: fix benchmarking
ClosedPublic

Authored by mjg on Feb 9 2022, 9:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 25, 12:56 AM
Unknown Object (File)
Fri, Oct 25, 12:56 AM
Unknown Object (File)
Fri, Oct 25, 12:56 AM
Unknown Object (File)
Fri, Oct 25, 12:56 AM
Unknown Object (File)
Fri, Oct 25, 12:36 AM
Unknown Object (File)
Mon, Oct 21, 10:43 PM
Unknown Object (File)
Sun, Oct 13, 1:08 PM
Unknown Object (File)
Sep 27 2024, 6:14 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.