lkml.org 
[lkml]   [2012]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 -mm 1/3] mm: reclaim at order 0 when compaction is enabled
From
Hi Rik

On Fri, Jan 27, 2012 at 3:59 AM, Rik van Riel <riel@redhat.com> wrote:
[...]

> @@ -2754,7 +2754,7 @@ loop_again:
>                 */
>                for (i = 0; i <= end_zone; i++) {
>                        struct zone *zone = pgdat->node_zones + i;
> -                       int nr_slab;
> +                       int nr_slab, testorder;
>                        unsigned long balance_gap;
>
>                        if (!populated_zone(zone))
> @@ -2787,7 +2787,20 @@ loop_again:
>                                (zone->present_pages +
>                                        KSWAPD_ZONE_BALANCE_GAP_RATIO-1) /
>                                KSWAPD_ZONE_BALANCE_GAP_RATIO);
> -                       if (!zone_watermark_ok_safe(zone, order,
> +                       /*
> +                        * Kswapd reclaims only single pages with compaction
> +                        * enabled. Trying too hard to reclaim until contiguous
> +                        * free pages have become available can hurt performance
> +                        * by evicting too much useful data from memory.
> +                        * Do not reclaim more than needed for compaction.
> +                        */
> +                       testorder = order;
> +                       if (COMPACTION_BUILD && order &&
> +                                       compaction_suitable(zone, order) !=
> +                                               COMPACT_SKIPPED)
> +                               testorder = 0;
> +
> +                       if (!zone_watermark_ok_safe(zone, testorder,
>                                        high_wmark_pages(zone) + balance_gap,
>                                        end_zone, 0)) {
>                                shrink_zone(priority, zone, &sc);

Hard to understand that zone is shrunk as hard as it was,
with water mark checked with new order, tippoint please.

Hillf
\
 
 \ /
  Last update: 2012-01-29 14:27    [W:0.097 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site