Skip to content

20250816-cpuid_get_flags_ex-optimize#9107

Merged
SparkiDev merged 1 commit into
wolfSSL:masterfrom
douzzer:20250816-cpuid_get_flags_ex-optimize
Aug 18, 2025
Merged

20250816-cpuid_get_flags_ex-optimize#9107
SparkiDev merged 1 commit into
wolfSSL:masterfrom
douzzer:20250816-cpuid_get_flags_ex-optimize

Conversation

@douzzer

@douzzer douzzer commented Aug 16, 2025

Copy link
Copy Markdown
Contributor

wolfcrypt/src/cpuid.c, wolfssl/wolfcrypt/cpuid.h: change cpuid_flags_t to a
regular word32, and use non-atomics for general flag checking, with a new
implementation of cpuid_get_flags_ex() that is threadsafe by idempotency;

rename strictly-threadsafe cpuid_get_flags_ex() as cpuid_get_flags_atomic()
(strictly accurate return value), and add cpuid_flags_atomic_t and
WC_CPUID_ATOMIC_INITIALIZER, used only for internal manipulation of flags in
cpuid.c where atomicity matters.

fixes 15% performance regression on SHA256-based XMSS.

tested with wolfssl-multi-test.sh ... check-source-text benchmark-wolfcrypt-intelasm-sp-asm-all quantum-safe-wolfssl-all-intelasm-sp-asm-helgrind

…t to a

  regular word32, and use non-atomics for general flag checking, with a new
  implementation of cpuid_get_flags_ex() that is threadsafe by idempotency;

rename strictly-threadsafe cpuid_get_flags_ex() as cpuid_get_flags_atomic()
  (strictly accurate return value), and add cpuid_flags_atomic_t and
  WC_CPUID_ATOMIC_INITIALIZER, used only for internal manipulation of flags in
  cpuid.c where atomicity matters.
@devin-ai-integration

This comment was marked as spam.

@douzzer

douzzer commented Aug 16, 2025

Copy link
Copy Markdown
Contributor Author

retest this please

Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception:
Unable to create live FilePath for wolf-linux-cloud-node-kd8x5r; wolf-linux-cloud-node-kd8x5r was marked offline: Connection was broken

@SparkiDev
SparkiDev removed the request for review from julek-wolfssl August 18, 2025 12:13
@SparkiDev SparkiDev self-assigned this Aug 18, 2025
@SparkiDev
SparkiDev merged commit 43f94a5 into wolfSSL:master Aug 18, 2025
248 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants