[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100113061023.GD3901@nick>
Date: Wed, 13 Jan 2010 17:10:24 +1100
From: Nick Piggin <npiggin@...e.de>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: Minchan Kim <minchan.kim@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH v2] mm, lockdep: annotate reclaim context to zone
reclaim too
On Wed, Jan 13, 2010 at 08:57:21AM +0900, KOSAKI Motohiro wrote:
> > On Tue, Jan 12, 2010 at 2:16 PM, KOSAKI Motohiro
> > <kosaki.motohiro@...fujitsu.com> wrote:
> > >
> > > Commit cf40bd16fd (lockdep: annotate reclaim context) introduced reclaim
> > > context annotation. But it didn't annotate zone reclaim. This patch do it.
> > >
> > > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
> > > Cc: Nick Piggin <npiggin@...e.de>
> > > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > > Cc: Ingo Molnar <mingo@...e.hu>
> > Reviewed-by: Minchan Kim <minchan.kim@...il.com>
> >
> > I think your good explanation in previous thread is good for
> > changelog. so I readd in here.
> > If you mind this, feel free to discard.
> > I don't care about it. :)
>
> Thanks, refrected.
>
> ====================================================
> Commit cf40bd16fd (lockdep: annotate reclaim context) introduced reclaim
> context annotation. But it didn't annotate zone reclaim. This patch do it.
>
> The point is, commit cf40bd16fd annotate __alloc_pages_direct_reclaim
> but zone-reclaim doesn't use __alloc_pages_direct_reclaim.
>
> current call graph is
>
> __alloc_pages_nodemask
> get_page_from_freelist
> zone_reclaim()
> __alloc_pages_slowpath
> __alloc_pages_direct_reclaim
> try_to_free_pages
>
> Actually, if zone_reclaim_mode=1, VM never call
> __alloc_pages_direct_reclaim in usual VM pressure.
Acked-by: Nick Piggin <npiggin@...e.de>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
> Reviewed-by: Minchan Kim <minchan.kim@...il.com>
> Cc: Nick Piggin <npiggin@...e.de>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Ingo Molnar <mingo@...e.hu>
> ---
> mm/vmscan.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 2bbee91..a039e78 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2547,6 +2547,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
> * and RECLAIM_SWAP.
> */
> p->flags |= PF_MEMALLOC | PF_SWAPWRITE;
> + lockdep_set_current_reclaim_state(gfp_mask);
> reclaim_state.reclaimed_slab = 0;
> p->reclaim_state = &reclaim_state;
>
> @@ -2590,6 +2591,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
>
> p->reclaim_state = NULL;
> current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE);
> + lockdep_clear_current_reclaim_state();
> return sc.nr_reclaimed >= nr_pages;
> }
>
> --
> 1.6.6
>
>
>
--
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