Re: Cache Coloring in Linux Kernel

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

 



On Wed, Nov 20, 2002 at 04:47:53PM +0800, #KUGAN VIVEKANANDARAJAH# wrote:
> I am interested in cache coloring for linux kerenel, it seems SGI has
> done some work on this already , but i am not able to get the patch
> for this. 
> Could any one tell me tell me where i can get the patch and more
> informatio regarding this.

The kernel slab cache allocator is doing something called colouring. It
works like this: When a slab is allocated and split up to the
structures, some space is left over. Thus the first structure can start
at offset from 0 to the amount of space left. The allocator thus chooses
all suitable offsets in turn (where suitable means aligned to specified
order with reasonable (for given platform) default).

Note, that this happens even for generic caches (kmalloc), where the
size is power of two. This is because for all caches with slab size
equal the page size the slab management data is at the end of the page,
so the space available is really PAGE_SIZE - 96.

I however don't know, if you are not talking about something more
sofisticated. (See comment in slab.c for reference to whitepaper about
the mechanizm implemented).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
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