[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120911004948.GA14205@bbox>
Date: Tue, 11 Sep 2012 09:49:48 +0900
From: Minchan Kim <minchan@...nel.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Nazarewicz <mina86@...a86.com>,
Mel Gorman <mel@....ul.ie>,
Wen Congyang <wency@...fujitsu.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: Re: [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from
free_area->free_list
Hi Bart,
On Thu, Sep 06, 2012 at 06:34:35PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Thursday 06 September 2012 04:53:38 Minchan Kim wrote:
> > Normally, MIGRATE_ISOLATE type is used for memory-hotplug.
> > But it's irony type because the pages isolated would exist
> > as free page in free_area->free_list[MIGRATE_ISOLATE] so people
> > can think of it as allocatable pages but it is *never* allocatable.
> > It ends up confusing NR_FREE_PAGES vmstat so it would be
> > totally not accurate so some of place which depend on such vmstat
> > could reach wrong decision by the context.
> >
> > There were already report about it.[1]
> > [1] 702d1a6e, memory-hotplug: fix kswapd looping forever problem
> >
> > Then, there was other report which is other problem.[2]
> > [2] http://www.spinics.net/lists/linux-mm/msg41251.html
> >
> > I believe it can make problems in future, too.
> > So I hope removing such irony type by another design.
> >
> > I hope this patch solves it and let's revert [1] and doesn't need [2].
> >
> > * Changelog v1
> > * Fix from Michal's many suggestion
> >
> > Cc: Michal Nazarewicz <mina86@...a86.com>
> > Cc: Mel Gorman <mel@....ul.ie>
> > Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> > Cc: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
> > Cc: Wen Congyang <wency@...fujitsu.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> > Signed-off-by: Minchan Kim <minchan@...nel.org>
> > ---
> > It's very early version which show the concept so I still marked it with RFC.
> > I just tested it with simple test and works.
> > This patch is needed indepth review from memory-hotplug guys from fujitsu
> > because I saw there are lots of patches recenlty they sent to about
> > memory-hotplug change. Please take a look at this patch.
>
> [...]
>
> > @@ -948,8 +954,13 @@ static int move_freepages(struct zone *zone,
> > }
> >
> > order = page_order(page);
> > - list_move(&page->lru,
> > - &zone->free_area[order].free_list[migratetype]);
> > + if (migratetype != MIGRATE_ISOLATE) {
> > + list_move(&page->lru,
> > + &zone->free_area[order].free_list[migratetype]);
> > + } else {
> > + list_del(&page->lru);
> > + isolate_free_page(page, order);
> > + }
> > page += 1 << order;
> > pages_moved += 1 << order;
> > }
>
> Shouldn't NR_FREE_PAGES counter be decreased somewhere above?
>
> [ I can see that it is not modified in __free_pages_ok() and
> free_hot_cold_page() because page is still counted as non-free one but
> here situation is different AFAICS. ]
>
> I tested the patch locally here with CONFIG_CMA=y and it causes some
> major problems for CMA (multiple errors from dma_alloc_from_contiguous()
> about memory ranges being busy and allocation failures).
>
> [ I'm sorry that I don't know more details yet but the issue should be
> easily reproducible. ]
At the moment, I don't have a time to look into that so I will revisit
in near future.
Thanks for the review and test!
>
> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung Poland R&D Center
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
Kind regards,
Minchan Kim
--
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