linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] improve robustness on handling migratetype
@ 2014-01-09  7:04 Joonsoo Kim
  2014-01-09  7:04 ` [PATCH 1/7] mm/page_alloc: synchronize get/set pageblock Joonsoo Kim
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Joonsoo Kim @ 2014-01-09  7:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Kirill A. Shutemov, Rik van Riel, Jiang Liu, Mel Gorman,
	Cody P Schafer, Johannes Weiner, Michal Hocko, Minchan Kim,
	Michal Nazarewicz, Andi Kleen, Wei Yongjun, Tang Chen, linux-mm,
	linux-kernel, Joonsoo Kim, Joonsoo Kim

Hello,

I found some weaknesses on handling migratetype during code review and
testing CMA.

First, we don't have any synchronization method on get/set pageblock
migratetype. When we change migratetype, we hold the zone lock. So
writer-writer race doesn't exist. But while someone changes migratetype,
others can get migratetype. This may introduce totally unintended value
as migratetype. Although I haven't heard of any problem report about
that, it is better to protect properly.

Second, (get/set)_freepage_migrate isn't used properly. I guess that it
would be introduced for per cpu page(pcp) performance, but, it is also
used by memory isolation, now. For that case, the information isn't
enough to use, so we need to fix it.

Third, there is the problem on buddy allocator. It doesn't consider
migratetype when merging buddy, so pages from cma or isolate region can
be moved to other migratetype freelist. It makes CMA failed over and over.
To prevent it, the buddy allocator should consider migratetype if
CMA/ISOLATE is enabled.

This patchset is aimed at fixing these problems and based on v3.13-rc7.

Thanks.

Joonsoo Kim (7):
  mm/page_alloc: synchronize get/set pageblock
  mm/cma: fix cma free page accounting
  mm/page_alloc: move set_freepage_migratetype() to better place
  mm/isolation: remove invalid check condition
  mm/page_alloc: separate interface to set/get migratetype of freepage
  mm/page_alloc: store freelist migratetype to the page on buddy
    properly
  mm/page_alloc: don't merge MIGRATE_(CMA|ISOLATE) pages on buddy

 include/linux/mm.h             |   35 +++++++++++++++++++++---
 include/linux/mmzone.h         |    2 ++
 include/linux/page-isolation.h |    1 -
 mm/page_alloc.c                |   59 ++++++++++++++++++++++++++--------------
 mm/page_isolation.c            |    5 +---
 5 files changed, 73 insertions(+), 29 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-02-03  9:17 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-09  7:04 [PATCH 0/7] improve robustness on handling migratetype Joonsoo Kim
2014-01-09  7:04 ` [PATCH 1/7] mm/page_alloc: synchronize get/set pageblock Joonsoo Kim
2014-01-09  9:08   ` Michal Nazarewicz
2014-01-09  7:04 ` [PATCH 2/7] mm/cma: fix cma free page accounting Joonsoo Kim
2014-01-09 21:10   ` Laura Abbott
2014-01-10  8:50     ` Joonsoo Kim
2014-01-09  7:04 ` [PATCH 3/7] mm/page_alloc: move set_freepage_migratetype() to better place Joonsoo Kim
2014-01-09  7:04 ` [PATCH 4/7] mm/isolation: remove invalid check condition Joonsoo Kim
2014-01-09  7:04 ` [PATCH 5/7] mm/page_alloc: separate interface to set/get migratetype of freepage Joonsoo Kim
2014-01-09  9:18   ` Michal Nazarewicz
2014-01-09  7:04 ` [PATCH 6/7] mm/page_alloc: store freelist migratetype to the page on buddy properly Joonsoo Kim
2014-01-09  9:19   ` Michal Nazarewicz
2014-01-09  7:04 ` [PATCH 7/7] mm/page_alloc: don't merge MIGRATE_(CMA|ISOLATE) pages on buddy Joonsoo Kim
2014-01-09  9:22   ` Michal Nazarewicz
2014-01-09  9:06 ` [PATCH 0/7] improve robustness on handling migratetype Michal Nazarewicz
2014-01-09 14:05   ` Joonsoo Kim
2014-01-09  9:27 ` Mel Gorman
2014-01-10  8:48   ` Joonsoo Kim
2014-01-10  9:48     ` Mel Gorman
2014-01-13  1:57       ` Joonsoo Kim
2014-01-29 16:52     ` Vlastimil Babka
2014-01-31 15:39       ` Mel Gorman
2014-02-03  7:45       ` Joonsoo Kim
2014-02-03  9:16         ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).