Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to GetThreadGroupAffinity if GetNativeSystemInfo reports wrongly #1587

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

isaevil
Copy link
Contributor

@isaevil isaevil commented Dec 18, 2024

Description

For some reason, GetNativeSystemInfo on Windows 11 (or WS2022) systems with multiple processor groups reports information from parent process (for example, when running tests using CTest) even though documentation states that dwNumberOfProcessors is "the number of logical processors in the current group". This patch fallbacks to using GetActiveProcessorCount on group from calling thread's affinity if possible.

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

…ngly

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
src/tbb/misc_ex.cpp Show resolved Hide resolved
src/tbb/misc_ex.cpp Show resolved Hide resolved
Copy link
Contributor

@dnmokhov dnmokhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@isaevil isaevil merged commit 8659619 into master Dec 20, 2024
25 checks passed
@isaevil isaevil deleted the dev/isaevil/windows-process-mask branch December 20, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants