Re: [PATCH 3/3] sl[auo]b: retry allocation once in case of failure.

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

 



On 01/02/2013 08:10 PM, Christoph Lameter wrote:
> On Wed, 19 Dec 2012, Glauber Costa wrote:
> 
>> When we are out of space in the caches, we will try to allocate a new
>> page.  If we still fail, the page allocator will try to free pages
>> through direct reclaim. Which means that if an object allocation failed
>> we can be sure that no new pages could be given to us, even though
>> direct reclaim was likely invoked.
> 
> Well this hits the hot allocation path with lots of additional checks
> that also require the touching of more cachelines.
> 
> How much impact will this have?
> 

speed: Hot path is one fast branch (with an almost-always correct hint).
slow path is full retry.

About the flag checking, I must say that they are already in the slow
path. The hot path is allocation succeeding. This is the first condition
to be tested, and we will bail out as soon as we see this value being
true. They can be moved inside a helper noinline function together with
the retry code itself.

size: the branch instruction + a call instruction, if done right (I got
this last part wrong in this set)

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