Public bug reported:

>From bug:

https://bugs.launchpad.net/bugs/1840511

clockhouse builds test started failing because of the presence of stderr
whenever using the function:

cpuinfo_linux_get_max_processors_count(void)

>From cpuid library.

This happens because:

----

#if defined(__ANDROID__) && !defined(CPU_SETSIZE)
    /*
     * Android NDK headers before platform 21 do not define CPU_SETSIZE,
     * so we hard-code its value, as defined in platform 21 headers
     */
    #if defined(__LP64__)
        static const uint32_t default_max_processors_count = 1024;
    #else
        static const uint32_t default_max_processors_count = 32;
    #endif
#else
    static const uint32_t default_max_processors_count = CPU_SETSIZE;
#endif

----

#if !defined(__ANDROID__)
    /*
     * sched.h is only used for CPU_SETSIZE constant.
     * Android NDK headers before platform 21 do have this constant in sched.h
     */
    #include <sched.h>
#endif

----

and resolving includes:

x86_64-linux-gnu/bits/cpu-set.h:

/* Size definition for CPU sets. */
#define __CPU_SETSIZE 1024

----

And the warning:

Warning in cpuinfo: kernel_max value of 8191 parsed from
/sys/devices/system/cpu/kernel_max exceeds platform-default limit 1023

Will always be displayed in Ubuntu OS, when it should NOT (does not make
any sense to trigger a warning for something that can't be changed).

Should ubuntu update sched.h and/or cpu-set.h to reflect its decision in
using 8192 max CPUs ?

** Affects: cpuinfo (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: Incomplete

** Also affects: linux (Ubuntu)
   Importance: Undecided
       Status: New

** Description changed:

  From bug:
  
  https://bugs.launchpad.net/bugs/1840511
  
- clockhouse test started failing because of the presence of stderr
+ clockhouse builds test started failing because of the presence of stderr
  whenever using the function:
  
  cpuinfo_linux_get_max_processors_count(void)
  
  From cpuid library.
  
  This happens because:
  
  ----
  
  #if defined(__ANDROID__) && !defined(CPU_SETSIZE)
-     /*
-      * Android NDK headers before platform 21 do not define CPU_SETSIZE,
-      * so we hard-code its value, as defined in platform 21 headers
-      */
-     #if defined(__LP64__)
-         static const uint32_t default_max_processors_count = 1024;
-     #else
-         static const uint32_t default_max_processors_count = 32;
-     #endif
+     /*
+      * Android NDK headers before platform 21 do not define CPU_SETSIZE,
+      * so we hard-code its value, as defined in platform 21 headers
+      */
+     #if defined(__LP64__)
+         static const uint32_t default_max_processors_count = 1024;
+     #else
+         static const uint32_t default_max_processors_count = 32;
+     #endif
  #else
-     static const uint32_t default_max_processors_count = CPU_SETSIZE;
+     static const uint32_t default_max_processors_count = CPU_SETSIZE;
  #endif
  
  ----
  
  #if !defined(__ANDROID__)
-     /*
-      * sched.h is only used for CPU_SETSIZE constant.
-      * Android NDK headers before platform 21 do have this constant in sched.h
-      */
-     #include <sched.h>
+     /*
+      * sched.h is only used for CPU_SETSIZE constant.
+      * Android NDK headers before platform 21 do have this constant in sched.h
+      */
+     #include <sched.h>
  #endif
  
  ----
  
  and resolving includes:
  
  x86_64-linux-gnu/bits/cpu-set.h:
  
  /* Size definition for CPU sets. */
  #define __CPU_SETSIZE 1024
  
  ----
  
  And the warning:
  
  Warning in cpuinfo: kernel_max value of 8191 parsed from
  /sys/devices/system/cpu/kernel_max exceeds platform-default limit 1023
  
  Will always be displayed in Ubuntu OS, when it should NOT (does not make
  any sense to trigger a warning for something that can't be changed).
  
  Should ubuntu update sched.h and/or cpu-set.h to reflect its decision in
  using 8192 max CPUs ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1840847

Title:
  cpuinfo_linux_get_max_processors_count always warns Ubuntu default MAX
  cpu values (stderr)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cpuinfo/+bug/1840847/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to