Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework CPU counting #656

Merged
merged 12 commits into from
Aug 2, 2021
Merged

Rework CPU counting #656

merged 12 commits into from
Aug 2, 2021

Commits on Jul 18, 2021

  1. Rework CPU counting

    Currently htop does not support offline CPUs and hot-swapping, e.g. via
        echo 0 > /sys/devices/system/cpu/cpu2/online
    
    Split the current single cpuCount variable into activeCPUs and
    existingCPUs.
    
    Supersedes: htop-dev#650
    Related: htop-dev#580
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    41af31b View commit details
    Browse the repository at this point in the history
  2. Add ProcessList_isCPUonline

    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    11d2206 View commit details
    Browse the repository at this point in the history
  3. UptimeMeter: treat all non-positive values as error

    Bogus uptime measurements can result in wrap-arounds, leading to
    negative garbage values printed.
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    fbe3a21 View commit details
    Browse the repository at this point in the history
  4. FreeBSD: skip exe check for kernel thread

    Kernel threads do not have an executable and the check can result in
    garbage values as unprivileged user.
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    af0b67c View commit details
    Browse the repository at this point in the history
  5. FreeBSD: calculate whether to show entry last

    Wait until it has been decided what kind of task the entry actually is.
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    3451b6c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    adcedf8 View commit details
    Browse the repository at this point in the history
  7. Enable affinity support for non-Linux

    sched_getaffinity() and sched_setaffinity() are also available on BSDs.
    Remove the Linux restraint.
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    1fb0c72 View commit details
    Browse the repository at this point in the history
  8. DragonFlyBSD: drop void TODO

    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    b148a4b View commit details
    Browse the repository at this point in the history
  9. DragonFlyBSD: calculate whether to show entry last

    Wait until it has been decided what kind of task the entry actually is.
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    f47e88f View commit details
    Browse the repository at this point in the history
  10. Solaris: support offline CPUs and hot-swapping

    Example hot-swapping:
        psradm -F -f 2
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    90cc16e View commit details
    Browse the repository at this point in the history
  11. OpenBSD: fix compile errors

    openbsd/OpenBSDProcessList.c:176:56: error: no member named 'ki_pid' in 'struct kinfo_proc'; did you mean 'p_pid'?
       const int mib[] = { CTL_KERN, KERN_PROC_CWD, kproc->ki_pid };
                                                           ^~~~~~
                                                           p_pid
    /usr/include/sys/sysctl.h:375:10: note: 'p_pid' declared here
            int32_t p_pid;                  /* PID_T: Process identifier. */
                    ^
    openbsd/OpenBSDProcessList.c:458:33: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
          if (opl->cpus[i].cpuIndex == id)
              ~~~~~~~~~~~~~~~~~~~~~ ^  ~~
    cgzones authored and BenBE committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    f608fc5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    edf236f View commit details
    Browse the repository at this point in the history