Page MenuHomePhabricator

[Support] heavyweight_hardware_concurrency uses affinity when counting cores fails, and never returns 0
AcceptedPublic

Authored by sammccall on Aug 9 2019, 3:56 PM.

Details

Summary

[Support] heavyweight_hardware_concurrency uses affinity when counting cores fails, and never returns 0

Previously it would fall back to std::thread::hardware_concurrency(),
which ignores affinity. llvm::hardware_concurrency() is better, but was
not available at the time.

Also, the case where std::thread::hardware_concurrency() returns 0 was
never handled. llvm::hardware_concurrency() never does this, so that's fixed.

Event Timeline

sammccall created this revision.Aug 9 2019, 3:56 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 9 2019, 3:56 PM
jfb added a comment.EditedAug 9 2019, 4:02 PM

The name of this patch is wrong?
Or rather, it's 2 in 1?

sammccall planned changes to this revision.Aug 9 2019, 4:04 PM

ugh, I accidentally reused a branch and squashed two patches together. Let me try again...

sammccall retitled this revision from [clangd] Give absolute path to clang-tidy and include-fixer. HintPath should always be absolute, some URI schemes care. to [Support] heavyweight_hardware_concurrency uses affinity when counting cores fails, and never returns 0.Aug 9 2019, 4:04 PM

hardware_concurrency

This revision is now accepted and ready to land.Mar 21 2021, 7:46 PM