Re: [PATCH] mm/slab: Improve performance of gathering slabinfo stats

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

 



Hmm.... What SLUB does is:

1. Keep a count of the total number of allocated slab pages per node.
	This counter only needs to be updated when a slab page is
	allocated from the page allocator or when it is freed to the
	page allocator. At that point we already hold the per node lock,
	page allocator operations are extremely costly anyways and so that
	is ok.

2. Keep a count of the number of partially allocated slab pages per node.
	At that point we have to access the partial list and take a per
	node lock. Placing the counter into the same cacheline and
	the increment/decrement into the period when the lock has been taken
	avoids the overhead.

The number of full pages is then

	total - partial


If both allocators would use the same scheme here then the code to
maintain the counter can be moved into mm/slab_common.c. Plus the per node
structures could be mostly harmonized between both allocators. Maybe even
the page allocator operations could become common code.

Aruna: Could you work on a solution like that?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]