[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110511155324.5c366900.akpm@linux-foundation.org>
Date: Wed, 11 May 2011 15:53:24 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Valdis.Kletnieks@...edu, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: mmotm 2011-04-29 - wonky VmRSS and VmHWM values after swapping
On Tue, 10 May 2011 18:04:45 +0200
Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> > hm, me too. After boot, hald has a get_mm_counter(mm, MM_ANONPAGES) of
> > 0xffffffffffff3c27. Bisected to Pater's
> > mm-extended-batches-for-generic-mmu_gather.patch, can't see how it did
> > that.
> >
>
> I haven't quite figured out how to reproduce, but does the below cure
> things? If so, it should probably be folded into the first patch
> (mm-mmu_gather-rework.patch?) since that is the one introducing this.
>
> ---
> Subject: mm: Fix RSS zap_pte_range() accounting
>
> Since we update the RSS counters when breaking out of the loop and
> release the PTE lock, we should start with fresh deltas when we
> restart the gather loop.
>
> Reported-by: Valdis.Kletnieks@...edu
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
> Index: linux-2.6/mm/memory.c
> ===================================================================
> --- linux-2.6.orig/mm/memory.c
> +++ linux-2.6/mm/memory.c
> @@ -1120,8 +1120,8 @@ static unsigned long zap_pte_range(struc
> spinlock_t *ptl;
> pte_t *pte;
>
> - init_rss_vec(rss);
> again:
> + init_rss_vec(rss);
> pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
> arch_enter_lazy_mmu_mode();
> do {
That fixed the negative hald VmHWM output on my test box.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists