Re: [PATCH 2/2] slob: introduce the SLOB allocator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 01, 2005 at 02:51:54PM -0600, Rob Landley wrote:
> On Tuesday 01 November 2005 12:33, Matt Mackall wrote:
> > SLOB is a traditional K&R/UNIX allocator with a SLAB emulation layer,
> > similar to the original Linux kmalloc allocator that SLAB replaced.
> > It's signicantly smaller code and is more memory efficient. But like
> > all similar allocators, it scales poorly and suffers from
> > fragmentation more than SLAB, so it's only appropriate for small
> > systems.
> 
> Just to clarify: define "small".  My current laptop has half a gigabyte of 
> ram.  (Yeah, I broke down and bought a real machine, and even kept a World of 
> Warcraft partition this time...)
> 
> Does small mean "this is better for laptops with < 4gig"?  In which case, 
> possibly this should be tied to CONFIG_HIGHMEM or some such?

This is targeted at the bottom of the range that Linux supports, ie
less than 32MB. I originally tested it with _2MB_.

This allocator's performance is linear in the number of
smaller-than-a-page memory fragments (page-sized fragments get
coalesced and handed back to the buddy allocator). When you've only
got 4MB, scanning through all those fragments doesn't take long. When
you've got 400MB, and a lot of fragmentation, it can be very slow
indeed. SLAB, on the other hand, is nearly O(1).

-- 
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux