Systemd 254 released and now has a new soft-reboot option:

    * A new "soft-reboot" mechanism has been added to the service manager.
      A "soft reboot" is similar to a regular reboot, except that it
      affects userspace only: the service manager shuts down any running
      services and other units, then optionally switches into a new root
      file system (mounted to /run/nextroot/), and then passes control to a
      systemd instance in the new file system which then starts the system
      up again. The kernel is not rebooted and neither is the hardware,
      firmware or boot loader. This provides a fast, lightweight mechanism
      to quickly reset or update userspace, without the latency that a full
      system reset involves. Moreover, open file descriptors may be passed
      across the soft reboot into the new system where they will be passed
      back to the originating services. This allows pinning resources
      across the reboot, thus minimizing grey-out time further. This new
      reboot mechanism is accessible via the new "systemctl soft-reboot"
      command.>
  • Chais@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Does that mean we will be able to update graphics drivers without a full reboot if the kernel didn’t update?

    • treadful
      link
      fedilink
      English
      arrow-up
      25
      arrow-down
      3
      ·
      1 year ago

      I don’t think any graphics drivers run in user-space, so probably not.

      • Backslash@feddit.de
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Yes they do, Mesa being one. Only the close to the metal stuff and Kernel-DRM is handled in kernel space, most of the heavy stuff is done in user space.

        • treadful
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          Where’s the line you’re drawing? And what would be the “heavy stuff” in user-space?

          I’m far from a kernel expert, but I still have the i915 module loaded into the kernel on this bad boy, which I think most people would call a driver.

          • Backslash@feddit.de
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            The heavy stuff would be things like shader compilation and state management for multiple different graphics APIs (OpenGL and Vulkan mostly).

            AFAIK Linux graphics drivers are usually separated into a userspace and a kernel space component, like amdgpu on the kernel side and RADV/RadeonSI within Mesa on the userspace side. So you do not need to do a full reboot to e.g. benefit from performance optimizations within Mesa to get things like faster shader compilation or more efficient draw call submission, which I think most people care about when doing driver updates. In fact you don’t even need to soft reboot, because once Mesa is updated, all following uses of it already run the new version, all without a reboot. However if your GPU is not yet supported by the kernel side, then Mesa is of no use to you.

            That being said, yes the kernel side is a very important part of the driver, but it’s such a low-level driver that very few people would be able to do much of anything with it, which is why I made that distinction.