Announcement

Collapse
No announcement yet.

Linux Developers Look At Dropping SLOB

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

  • Linux Developers Look At Dropping SLOB

    Phoronix: Linux Developers Look At Dropping SLOB

    Linux kernel developers are looking at deprecating and ultimately removing the SLOB memory allocator...

    https://www.phoronix.com/news/Linux-Wants-To-Drop-SLOB

  • #2
    Yeah, let's remove everything that is memory efficient ...

    Comment


    • #3
      Originally posted by Raka555 View Post
      Yeah, let's remove everything that is memory efficient ...
      Does anyone actually use SLOB instead of SLUB at modern desktop PCs?

      Comment


      • #4
        Originally posted by Raka555 View Post
        Yeah, let's remove everything that is memory efficient ...
        Read the actual mailing list post. It's explained that even memory-limited use cases like routers don't use SLOB. Both the mailing list post and the Phoronix article both mention that SLUB's memory usage can already by made to nearly match SLOB. The post on the mailing list also mentions that removing SLOB would allow kfree and kmem_cache_free() to be combined. Attempts are being made to allow SLOB to be compatible with that change but it would increase it's memory usage and further decrease any advantages that would be gained from using it over SLUB.

        Comment


        • #5
          Interesting how kernel and userspace needs seem to differ here. From what I understand, SLOB (which is now going to get dropped) was actually the one of the three which was closest to the userspace allocator.

          Comment


          • #6
            I was wondering why I'd never seen it in the kernel menuconfig before. Ah...

            Code:
            config SLOB
                   depends on EXPERT
                   bool "SLOB (Simple Allocator)"​

            Comment


            • #7
              Honestly, good riddance - that thing was always a mess!

              Comment


              • #8
                Unless you're literally counting bytes, ie on an MCU, SLOB will probably cost you more memory than it saves. Why? Because it's slow. Linux is a multiprocessing system. On a multiprocessing system, optimising for speed saves memory. The longer a process takes to run, the longer it takes to complete and release the memory it was allocated. If the process uses 12MB and it executes 0.1ms faster, that saves 1200 byte-seconds. So then the allocator would need to use 1200 extra bytes over SLOB to actually have a negative impact on available memory.

                Comment


                • #9
                  Originally posted by linuxgeex View Post
                  Unless you're literally counting bytes, ie on an MCU, SLOB will probably cost you more memory than it saves. Why? Because it's slow. Linux is a multiprocessing system. On a multiprocessing system, optimising for speed saves memory. The longer a process takes to run, the longer it takes to complete and release the memory it was allocated. If the process uses 12MB and it executes 0.1ms faster, that saves 1200 byte-seconds. So then the allocator would need to use 1200 extra bytes over SLOB to actually have a negative impact on available memory.
                  How does this affect the case where there are few processes tho? I mean specifically for embedded Linux.

                  Originally posted by ffs_ View Post
                  Does anyone actually use SLOB instead of SLUB at modern desktop PCs?
                  Why does people think Linux is only for desktop? It's partially an honest question, tho I'm a bit amazed at the short sighted of the question.
                  Of course, the questions is there regardless of whether SLUB is an appropriate replacement for the cases in which SLOB is used.​

                  Comment


                  • #10
                    Originally posted by ffs_ View Post

                    Does anyone actually use SLOB instead of SLUB at modern desktop PCs?
                    Every Phoronixer does.

                    Comment

                    Working...
                    X