Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215962

Support ThreadPriorityPolicy mode 1 for non-root users on linux/bsd

    Details

    • Subcomponent:
    • Resolved In Build:
      b03

      Backports

        Description

        Currently, when ThreadPriorityPolicy is set to 1 (so called Aggressive mode), on linux and bsd(+Mac) a root-user-check (geteuid() != 0)) is done.
        See for example the coding in jdk/src/hotspot/os/linux/os_linux.cpp int prio_init().

        However the root-user-check has a few drawbacks:
        - it blocks the capabilities feature available on current Linux distros (CAP_SYS_NICE capability) that can be used to allow setting lower niceness also for non-root
        - setting a higher "niceness" (lower priority) is not possible on Linux for non-root because of the geteuid check

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mbaesken Matthias Baesken
                  Reporter:
                  mbaesken Matthias Baesken
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: