[Openmp-commits] [PATCH] D139802: [OpenMP] Skip extra blank line when parsing /proc/cpuinfo on LoongArch64

Gong LingQin via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 12 00:40:14 PST 2022


gonglingqin added inline comments.


================
Comment at: openmp/runtime/src/kmp_affinity.cpp:2948-2949
+      // The parsing logic of /proc/cpuinfo in this function highly depends on
+      // the blank lines between each processor info block. But there is a
+      // disrupter on LoongArch that a blank line exists before the first
+      // processor info block (i.e. after the "system type" line). We must skip
----------------
xen0n wrote:
> "But on LoongArch a blank line exists before ..." so the sentence could be shorter.
> 
> Also, as one of the people behind the kernel port, I can tell you we explicitly added the blank line because the "system type" line is unrelated to any of the CPUs; it's kind of global info. Maybe you can try mentioning this design consideration for more context but I feel it's okay to not do so either. It's up to you.
Thanks! Glad to know the reason for this design, I will update the comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139802



More information about the Openmp-commits mailing list