Re: Slab allocator - questions

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

 



Hello,

On Wed, Apr 03, 2002 at 10:59:29AM +0200, Martin Maletinsky wrote:
...
> 2) Why are there general caches up to a size of 128K byte? Since a slab 
> consists of physically contiguous pages, one might call right into the 
> buddy system to get chunks of memory that are a multiple of a page size. 
> What is the benefit of allocating memory chunks that are a multiple of 
> a page size by using kmalloc()/kmem_cache_alloc() rather than
> get_free_pages?

Memory fragmentation.  By grouping objects of the same type and similar 
lifetimes, slab helps prevent the pinning of many individual pages across 
the system.  Since slab allocations cannot be relocated, this helps when 
other allocations need to obtain non-0 order pages.

> 3) How does the slab cache allocator deal with high memory pages in 2.4.x 
> (i.e. pages for which no KSEG address exists)?

They are not used.

		-ben
-- 
"A man with a bass just walked in,
 and he's putting it down
 on the floor."
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux