Announcement

Collapse
No announcement yet.

Linux 5.15 Adds New Syscall To More Quickly Free Memory Of Dying Processes

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

  • Linux 5.15 Adds New Syscall To More Quickly Free Memory Of Dying Processes

    Phoronix: Linux 5.15 Adds New Syscall To More Quickly Free Memory Of Dying Processes

    To help out memory pressure / out-of-memory killing solutions like systemd-oomd or Android's LMKD, Linux 5.15 is introducing the "process_mrelease" system call to more quickly free the memory of dying processes...

    https://www.phoronix.com/scan.php?pa...ocess-mrelease

  • #2
    Not even properly dead and already harvesting its organs

    Comment


    • #3
      Originally posted by pipe13 View Post
      Not even properly dead and already harvesting its organs
      Well, you know, the fresher the better.

      Comment


      • #4
        What happens to the dying process? does it get to run any code? is execution immediately halted?

        Comment


        • #5
          Originally posted by boxie View Post
          What happens to the dying process? does it get to run any code? is execution immediately halted?
          subj talks about process sleeping in uninterruptible sleep, it doesn't run anything, just waits

          Comment


          • #6
            And what about Zombie processes? Another syscall would be needed.

            Comment


            • #7
              Originally posted by StarterX4 View Post
              And what about Zombie processes? Another syscall would be needed.
              VmRSS=0 if state=Z, no syscall needed.

              Comment


              • #8
                Originally posted by boxie View Post
                What happens to the dying process? does it get to run any code? is execution immediately halted?
                does it get to run any code? - no

                is execution immediately halted? - yes

                Memory is not released instantly, but `/proc/pid/statm` shows 0 0 0 0 0 immediately after sending SIGKILL to the process.

                Memory can be released for a few seconds if the process is large and some of its memory is in the swap space.
                Last edited by hakavlad; 07 September 2021, 06:40 AM.

                Comment


                • #9
                  Originally posted by hakavlad View Post

                  does it get to run any code? - no

                  is execution immediately halted? - yes

                  Memory is not released instantly, but `/proc/pid/statm` shows 0 0 0 0 0 immediately after sending SIGKILL to the process.

                  Memory can be released for a few seconds if the process is large and some of its memory is in the swap space.
                  thank you for a very nice explanation!

                  Comment


                  • #10
                    Just fix the restore from starting to use swap memory, it is what is killing everything that Linux never recovers from a swap condition. It doesn't try, and if you force it by disabling swap, it takes 10-100x longer than it should.

                    Comment

                    Working...
                    X