Announcement

Collapse
No announcement yet.

KDE's KWin Running On Wayland Gets Real-Time Scheduling

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    "KWin basically gets priority access to the CPU whenever needed so that all input events and rendering can be done in a time efficient manner. This new policy is being done via libcap with the CAP_SYS_NICE capability."

    Just to clarify some technical details, as the above (from the OP article) is not an explanation of real-time scheduling:
    "priority access to the CPU" and real-time scheduling are two pairs of shoes!

    While the first one is handled with the NICE value, any scheduling strategy could be applied to it. Whether the applied strategy is hardcoded or selectable is also another thing.
    Real-time on the other hand means fullfillment of jobs on time (not too early and not too late).
    A job (or its parent service) has to tell the RT scheduler how long it needs at max to complete, and when it needs to be repeated or by when it should have gotten all the necessary CPU time to complete.
    The scheduler takes these information and the priority of all jobs and sorts and splits them according to cycle time.

    This means, that a real-time job can have a low priority and fullfill its job in the target time while there might be a higher-priority job that gets much more CPU time and is served first in each cycle. And that higher-priority job might not even be run in real-time.

    ---
    Straight on topic: I welcome the change if it means my mouse won't hang when I copy files over USB.
    I just hope it doesn't add too much overhead by unnessarily using cycles while the user doesn't interact - this might increase battery power draw on laptops.

    Comment


    • #22
      Originally posted by GhostOfFunkS View Post
      This is steps down the road where desktop users end up with RT kernels, jack and Gentoo compiler magic.
      That sounds like a good plan, really. I would prefer RT patches get finally merged upstream, along with other ones. Thanks to give us that great idea!

      Comment


      • #23
        Originally posted by timofonic View Post

        That sounds like a good plan, really. I would prefer RT patches get finally merged upstream, along with other ones. Thanks to give us that great idea!
        Why would you want RT on a non-RT kernel?
        Linux will never be as good and reliable at it as a real RTOS and it will only slow things down for most other use cases.

        Comment


        • #24
          Originally posted by Azrael5 View Post
          Why Kwin involves CPu instead of GPu?
          It involves both. Input is received by CPU, not GPU, for example. Does not mean that the rendering is not using GPU.
          When Kde will be ready for wayland?
          Soon (tm)

          Comment


          • #25
            Originally posted by unixfan2001 View Post
            Why would you want RT on a non-RT kernel?
            Linux will never be as good and reliable at it as a real RTOS and it will only slow things down for most other use cases.
            Some applications (like high-end sound acquisition and play) appear to like a lot having the higher priority you can give them with a RT kernel.

            Does not mean that Linux becomes a RTOS.

            Comment


            • #26
              Originally posted by starshipeleven View Post
              Some applications (like high-end sound acquisition and play) appear to like a lot having the higher priority you can give them with a RT kernel.

              Does not mean that Linux becomes a RTOS.
              Well said! Linux distros aimed at music production use RT kernels, for example. And there's much more possibilities than that.

              About Linux will never be a RTOS: So what? More difficult things happened, like Microsoft releasing GPL software. Never say never

              Comment


              • #27
                Originally posted by GhostOfFunkS View Post
                No one needs to tell the professionals how to fix this. They already know; profiling and plug the worst offenders one by one. This is not an easy job and it might take years to get everything working. Privilege hacks is just procrastination, and yeah teenager stuff.
                It isn't kwin's performance that is the issue here, it is the other programs on your system. Firefox won't be able to prevent your mouse from working anymore.

                Comment


                • #28
                  Originally posted by starshipeleven View Post
                  Some applications (like high-end sound acquisition and play) appear to like a lot having the higher priority you can give them with a RT kernel.

                  Does not mean that Linux becomes a RTOS.
                  Perhaps I misread timofonic but he made it sound like making RT the default kernel config. Which would be a bad thing.

                  Comment


                  • #29
                    Originally posted by unixfan2001 View Post

                    Perhaps I misread timofonic but he made it sound like making RT the default kernel config. Which would be a bad thing.
                    No, he is talking about having real time capabilities as part of the default kernel, but not to make it run in real-time mode by default. The real-time capabilities would still need to be enabled at run time to actually do anything.

                    Comment

                    Working...
                    X