Re: swap storm since kernel 3.2.x

From: Hillf Danton
Date: Thu Feb 09 2012 - 07:02:19 EST


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/