Re: too big min_free_kbytes

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

 



On 01/27/2011 04:31 PM, Mel Gorman wrote:

Whatever the final solution, it both needs to prevent too much memory
being reclaimed and allow kswapd to go to sleep if there is no
indication from the page allocator that it should stay awake.

A third requirement:

If one zone has a lot lower memory pressure than another zone,
we want to do relatively more memory allocations from that zone,
than from a zone where the memory is heavily used.

If kswapd only ever goes up to the high watermark, and also uses
that as its sleep point, the allocations end up corresponding to
zone size alone and not to memory pressure.

Going a little bit above the high watermark (1% of zone size?
high + min watermark?) will help balance things out between zones.

  			if (!zone_watermark_ok_safe(zone, order,
-					8*high_wmark_pages(zone), end_zone, 0))
+					(zone->present_pages +
+					 KSWAPD_ZONE_BALANCE_GAP_RATIO-1) /
+					 KSWAPD_ZONE_BALANCE_GAP_RATIO +
+					high_wmark_pages(zone), end_zone, 0))

Rik has already pointed out that this potentially is a very large gap
but that is an addressable problem if the final decision goes this
direction.

I was wrong.  I guess on some systems the min watermark can be less
than 1% and (high + min) may be better, but on most systems the
number of pages should be about the same.

Maybe we should use high_wmark_pages(zone) + low_wmark_pages(zone)
for easy readability?

--
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.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]