This commit is contained in:
Yangyu Chen 2025-12-24 18:39:03 +08:00 committed by GitHub
commit 1d46132372
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -156,7 +156,7 @@ std::string VlThreadPool::numaAssign() {
// Make a reasonable processor affinity selection
const int num_threads = static_cast<int>(m_workers.size());
if (num_threads < 2) return "too few threads";
if (static_cast<unsigned>(num_threads) > num_proc) return "too many threads";
if (static_cast<unsigned>(num_threads) >= num_proc - 1) return "too many threads";
// Read CPU info.
// Uncertain if any modern system has gaps in the processor id (Solaris

View File

@ -41,7 +41,8 @@ for trial in range(0, trials):
if sys.platform != "darwin":
test.file_grep(gantt_log, r'CPU info:')
test.file_grep(gantt_log, r'NUMA status += (assigned|%Warning: no /proc/cpuinfo)')
test.file_grep(gantt_log,
r'NUMA status += (assigned|too many threads|%Warning: no /proc/cpuinfo)')
# False fails occasionally
# test.file_grep_not(gantt_log, r'%Warning:') # e.g. There were fewer CPUs (1) than threads (3).