Re: slab cache

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

 



> in the 2.4 kernels, each cache contains the list of partial, full and
> free slabs. however, in 2.6 kernels, these lists have been moved to
> the kmem_list3 struct.

here is some more info:
in 2.4 kernels, we have 
struct kmem_cache_s {
191 /* 1) each alloc & free */
192         /* full, partial first, then free */
193         struct list_head        slabs_full;
194         struct list_head        slabs_partial;
195         struct list_head        slabs_free;
....

whereas in 2.6 we have:
struct kmem_cache_s {
/* 1) per-cpu data, touched during every alloc/free */
	struct array_cache	*array[NR_CPUS];
	unsigned int		batchcount;
	unsigned int		limit;
/* 2) touched by every alloc & free from the backend */
	struct kmem_list3	lists;
....
and 
struct kmem_list3 {
	struct list_head	slabs_partial;	/* partial list first, better asm code */
	struct list_head	slabs_full;
	struct list_head	slabs_free;


kind regards
anupam
-- 
if you need gmail invites, let me know !

--
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