Skip to content

threading: use psutil to calculate CPU affinitity size, which adds Windows & FreeBSD support#5416

Merged
adamnovak merged 4 commits intomasterfrom
psutil_get_affinity
Feb 4, 2026
Merged

threading: use psutil to calculate CPU affinitity size, which adds Windows & FreeBSD support#5416
adamnovak merged 4 commits intomasterfrom
psutil_get_affinity

Conversation

@mr-c
Copy link
Copy Markdown
Contributor

@mr-c mr-c commented Dec 8, 2025

I made a recent change in cwltool and I thought to check Toil's logic as well. Presumably psutil might improve their support for query the CPU affinity set in the future, which is another reason to defer to them

Changelog Entry

To be copied to the draft changelog by merger:

  • threading: use psutil to calculate CPU affinitity size, which adds Windows & FreeBSD support

Reviewer Checklist

  • Make sure it is coming from issues/XXXX-fix-the-thing in the Toil repo, or from an external repo.
    • If it is coming from an external repo, make sure to pull it in for CI with:
      contrib/admin/test-pr otheruser theirbranchname issues/XXXX-fix-the-thing
      
    • If there is no associated issue, create one.
  • Read through the code changes. Make sure that it doesn't have:
    • Addition of trailing whitespace.
    • New variable or member names in camelCase that want to be in snake_case.
    • New functions without type hints.
    • New functions or classes without informative docstrings.
    • Changes to semantics not reflected in the relevant docstrings.
    • New or changed command line options for Toil workflows that are not reflected in docs/running/{cliOptions,cwl,wdl}.rst
    • New features without tests.
  • Comment on the lines of code where problems exist with a review comment. You can shift-click the line numbers in the diff to select multiple lines.
  • Finish the review with an overall description of your opinion.

Merger Checklist

  • Make sure the PR passed tests, including the Gitlab tests, for the most recent commit in its branch.
  • Make sure the PR has been reviewed. If not, review it. If it has been reviewed and any requested changes seem to have been addressed, proceed.
  • Merge with the Github "Squash and merge" feature.
    • If there are multiple authors' commits, add Co-authored-by to give credit to all contributing authors.
  • Copy its recommended changelog entry to the Draft Changelog.
  • Append the issue number in parentheses to the changelog entry.

@mr-c mr-c force-pushed the psutil_get_affinity branch from 0a30665 to a353e13 Compare December 17, 2025 17:29
@mr-c mr-c force-pushed the psutil_get_affinity branch from a353e13 to d4dcdd7 Compare February 2, 2026 16:08
Copy link
Copy Markdown
Member

@adamnovak adamnovak left a comment

Choose a reason for hiding this comment

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

This looks like an improvement.

@adamnovak adamnovak merged commit 2889bf1 into master Feb 4, 2026
3 checks passed
@adamnovak adamnovak deleted the psutil_get_affinity branch February 4, 2026 15:48
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.

2 participants