Re: swap storm since kernel 3.2.x

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

 



On Thu, Feb 9, 2012 at 7:36 PM, Johannes Stezenbach <js@xxxxxxxxx> wrote:
> On Wed, Feb 08, 2012 at 08:34:14PM +0800, Hillf Danton wrote:
>> And I want to ask kswapd to do less work, the attached diff is
>> based on 3.2.5, mind to test it with CONFIG_DEBUG_OBJECTS enabled?
>
> Sorry, for slow reply.  The patch does not apply to 3.2.4
> (3.2.5 only has the ASPM change which I don't want to
> try atm).  Is the patch below correct?
>

It is fine;)

Thanks
Hillf

> I'll let this run for a while and will report back.
>
> Thanks
> Johannes
>
>
> --- mm/vmscan.c.orig    2012-02-03 21:39:51.000000000 +0100
> +++ mm/vmscan.c 2012-02-09 12:30:42.000000000 +0100
> @@ -2067,8 +2067,11 @@ restart:
>                 * with multiple processes reclaiming pages, the total
>                 * freeing target can get unreasonably large.
>                 */
> -               if (nr_reclaimed >= nr_to_reclaim && priority < DEF_PRIORITY)
> +               if (nr_reclaimed >= nr_to_reclaim) {
> +                       nr_to_reclaim = 0;
>                        break;
> +               }
> +               nr_to_reclaim -= nr_reclaimed;
>        }
>        blk_finish_plug(&plug);
>        sc->nr_reclaimed += nr_reclaimed;
> @@ -2535,12 +2538,12 @@ static unsigned long balance_pgdat(pg_da
>                 * we want to put equal scanning pressure on each zone.
>                 */
>                .nr_to_reclaim = ULONG_MAX,
> -               .order = order,
>                .mem_cgroup = NULL,
>        };
>        struct shrink_control shrink = {
>                .gfp_mask = sc.gfp_mask,
>        };
> +       sc.order = order = 0;
>  loop_again:
>        total_scanned = 0;
>        sc.nr_reclaimed = 0;

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


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