Re: [PATCH v3 -mm 1/3] mm: reclaim at order 0 when compaction is enabled

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

 



Hi Rik

On Fri, Jan 27, 2012 at 3:59 AM, Rik van Riel <riel@xxxxxxxxxx> 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
��.n������g����a����&ޖ)���)��h���&������梷�����Ǟ�m������)�����b�n���y��{^�w�r���&�i��('����춊m�鞵��â����چ�����i�������$����



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