On Wed, 2008-04-09 at 00:11 +0300, Pekka Enberg wrote:
Also, this scheme so far does not provide for a means to detect the end
of pressure situation.
I need both triggers, enter pressure and exit pressure. Enter pressure
is easy enough, that's when normal allocations start failing. Exit
pressure however is more difficult - that is basically when allocations
start succeeding again. You'll see that my patches basically always
attempt a regular allocation as long as we're in the emergency state.
Also, the requirement for usage of emergency memory (GFP_MEMALLOC,
PF_MEMALLOC) is that it will be freed without external conditions. So
while it might be delayed for a while (it might sit in the fragment
assembly cache for a while) it doesn't need any external input to get
freed again:
- it will either get reclaimed from this cache;
- it will exit the cache as a full packet and:
- get dropped, or
- get processed.
--