[PATCH] D85531: [SystemZ/ZOS] Add support for getHostNumPhysicalCores()

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 03:11:18 PDT 2020


Kai added inline comments.


================
Comment at: llvm/lib/Support/Host.cpp:1334
+      static_cast<uintptr_t>(reinterpret_cast<unsigned int &>(CVT[CVTCSD])));
+  return reinterpret_cast<int &>(CSD[CSD_NUMBER_ONLINE_STANDARD_CPS]);
+}
----------------
MaskRay wrote:
> If z/OS supports something similar to `taskset -c 0-3 $program`, make sure the function returns a number less than or equal to 4. 
Thanks for the hint. This kind of command is not supported on z/OS.
The reason is the fault tolerance available in z/OS: if a defect in a CP is detected, then this CP can go offline and a spare CP can continue to run the code exactly at the point where the former CP went offline. This does not work if the process is tied to a certain set of CPs, and therefore it's not supported.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85531/new/

https://reviews.llvm.org/D85531



More information about the llvm-commits mailing list