Re: [PATCH 3.2.0-rc1 2/3] MM hook for page allocation and release

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

 



On 01/05/2012 07:49 AM, Pekka Enberg wrote:
On Thu, Jan 5, 2012 at 1:26 PM,<leonid.moiseichuk@xxxxxxxxx>  wrote:
I agree that hooking alloc_pages is ugly way. So alternatives I see:

- shrinkers (as e.g. Android OOM used) but shrink_slab called only from
try_to_free_pages only if we are on slow reclaim path on memory allocation,
so it cannot be used for e.g. 75% memory tracking or when pages released to
notify user space that we are OK. But according to easy to use it will be the
best approach.

Well, there is always the page cache.

If, at reclaim time, the amount of page cache + free memory
is below the free threshold, we should still have space left
to handle userspace things.

It may be possible to hijack memcg accounting to get lower
usage thresholds for earlier notification.  That way the code
can stay out of the true fast paths like alloc_pages.

--
All rights reversed

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]