Re: CMA broken in next-20120926

From: Bartlomiej Zolnierkiewicz
Date: Tue Oct 09 2012 - 04:41:28 EST



Hi,

On Monday 08 October 2012 10:48:07 Mel Gorman wrote:
> On Mon, Oct 08, 2012 at 05:06:54PM +0900, Minchan Kim wrote:
> > Hi Mel,
> >
> > On Tue, Oct 02, 2012 at 04:12:17PM +0100, Mel Gorman wrote:
> > > On Tue, Oct 02, 2012 at 05:03:07PM +0200, Thierry Reding wrote:
> > > > On Tue, Oct 02, 2012 at 03:41:35PM +0100, Mel Gorman wrote:
> > > > > On Tue, Oct 02, 2012 at 02:48:14PM +0200, Thierry Reding wrote:
> > > > > > > So this really isn't all that new, but I just wanted to confirm my
> > > > > > > results from last week. We'll see if bisection shows up something
> > > > > > > interesting.
> > > > > >
> > > > > > I just finished bisecting this and git reports:
> > > > > >
> > > > > > 3750280f8bd0ed01753a72542756a8c82ab27933 is the first bad commit
> > > > > >
> > > > > > I'm attaching the complete bisection log and a diff of all the changes
> > > > > > applied on top of the bad commit to make it compile and run on my board.
> > > > > > Most of the patch is probably not important, though. There are two hunks
> > > > > > which have the pageblock changes I already posted an two other hunks
> > > > > > with the patch you posted earlier.
> > > > > >
> > > > > > I hope this helps. If you want me to run any other tests, please let me
> > > > > > know.
> > > > > >
> > > > >
> > > > > Can you test with this on top please?
> > > >
> > > > That doesn't build on top of the bad commit. Or is it supposed to go on
> > > > top of next-20120926?
> > > >
> > >
> > > It doesn't build or do you mean it doesn't apply? Assuming the problem
> > > was that it didn't apply then try this one. It applies on top of
> > > next-20120928 which is the closest tag I have to next-20120926.
> > >
> > > ---8<---
> > > mm: compaction: Cache if a pageblock was scanned and no pages were isolated -fix3
> > >
> > > CMA requires that the PG_migrate_skip hint be skipped but it was only
> > > skipping it when isolating pages for migration, not for free. Ensure
> > > cc->isolate_skip_hint gets passed in both cases.
> > >
> > > This is a fix for
> > > mm-compaction-cache-if-a-pageblock-was-scanned-and-no-pages-were-isolated-fix.patch
> > >
> > > Signed-off-by: Mel Gorman <mgorman@xxxxxxx>
> > Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
> >
> > But please resend below compile error fixing.
> >
>
> Thanks Minchan. I did resent this patch to Andrew with the subject "[PATCH]
> mm: compaction: Cache if a pageblock was scanned and no pages were isolated
> -fix3". It should have had the build errors fixed but has not been
> picked up yet.

I also need following patch to make CONFIG_CMA=y && CONFIG_COMPACTION=y case
work:

From: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Subject: [PATCH] mm: compaction: cache if a pageblock was scanned and no pages were isolated - cma fix

Patch "mm: compaction: cache if a pageblock was scanned and no pages
were isolated" needs a following fix to successfully boot next-20121002
kernel (same with next-20121008) with CONFIG_CMA=y and CONFIG_COMPACTION=y
(with applied -fix1, -fix2, -fix3 patches from Mel Gorman and also with
cmatest module from Thierry Reding compiled in).

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
mm/compaction.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/mm/compaction.c
===================================================================
--- a/mm/compaction.c 2012-10-08 18:10:53.491679716 +0200
+++ b/mm/compaction.c 2012-10-08 18:11:33.615679713 +0200
@@ -117,7 +117,8 @@ static void update_pageblock_skip(struct
bool migrate_scanner)
{
struct zone *zone = cc->zone;
- if (!page)
+
+ if (!page || cc->ignore_skip_hint)
return;

if (!nr_isolated) {
--
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/