Re: [RFC][PATCH 1/6] mm: slab allocation fairness
From: Peter Zijlstra <hidden>
Date: 2006-11-30 18:55:15
Also in:
linux-mm
On Thu, 2006-11-30 at 10:52 -0800, Christoph Lameter wrote:
On Thu, 30 Nov 2006, Peter Zijlstra wrote:quoted
The slab has some unfairness wrt gfp flags; when the slab is grown the gfp flags are used to allocate more memory, however when there is slab space available, gfp flags are ignored. Thus it is possible for less critical slab allocations to succeed and gobble up precious memory.The gfpflags are ignored if there are 1) objects in the per cpu, shared or alien caches 2) objects are in partial or free slabs in the per node queues.
Yeah, basically as long as free objects can be found. No matter how 'hard' is was to obtain these objects.
quoted
This patch avoids this by keeping track of the allocation hardness when growing. This is then compared to the current slab alloc's gfp flags.The approach is to force the allocation of additional slab to increase the number of free slabs? The next free will drop the number of free slabs back again to the allowed amount.
No, the forced allocation is to test the allocation hardness at that point in time. I could not think of another way to test that than to actually to an allocation.