linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Aggressively allocate the pages on cma reserved memory
@ 2014-05-08  0:32 Joonsoo Kim
  2014-05-08  0:32 ` [RFC PATCH 1/3] CMA: remove redundant retrying code in __alloc_contig_migrate_range Joonsoo Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 45+ messages in thread
From: Joonsoo Kim @ 2014-05-08  0:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Rik van Riel, Johannes Weiner, Mel Gorman, Joonsoo Kim,
	Laura Abbott, Minchan Kim, Heesub Shin, Marek Szyprowski,
	Michal Nazarewicz, linux-mm, linux-kernel

Hello,

This series tries to improve CMA.

CMA is introduced to provide physically contiguous pages at runtime
without reserving memory area. But, current implementation works like as
reserving memory approach, because allocation on cma reserved region only
occurs as fallback of migrate_movable allocation. We can allocate from it
when there is no movable page. In that situation, kswapd would be invoked
easily since unmovable and reclaimable allocation consider
(free pages - free CMA pages) as free memory on the system and free memory
may be lower than high watermark in that case. If kswapd start to reclaim
memory, then fallback allocation doesn't occur much.

In my experiment, I found that if system memory has 1024 MB memory and
has 512 MB reserved memory for CMA, kswapd is mostly invoked around
the 512MB free memory boundary. And invoked kswapd tries to make free
memory until (free pages - free CMA pages) is higher than high watermark,
so free memory on meminfo is moving around 512MB boundary consistently.

To fix this problem, we should allocate the pages on cma reserved memory
more aggressively and intelligenetly. Patch 2 implements the solution.
Patch 1 is the simple optimization which remove useless re-trial and patch 3
is for removing useless alloc flag, so these are not important.
See patch 2 for more detailed description.

This patchset is based on v3.15-rc4.

Thanks.
Joonsoo Kim (3):
  CMA: remove redundant retrying code in __alloc_contig_migrate_range
  CMA: aggressively allocate the pages on cma reserved memory when not
    used
  CMA: always treat free cma pages as non-free on watermark checking

 include/linux/mmzone.h |    6 +++
 mm/compaction.c        |    4 --
 mm/internal.h          |    3 +-
 mm/page_alloc.c        |  117 +++++++++++++++++++++++++++++++++++++++---------
 4 files changed, 102 insertions(+), 28 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2014-05-26  2:41 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08  0:32 [RFC PATCH 0/3] Aggressively allocate the pages on cma reserved memory Joonsoo Kim
2014-05-08  0:32 ` [RFC PATCH 1/3] CMA: remove redundant retrying code in __alloc_contig_migrate_range Joonsoo Kim
2014-05-09 15:44   ` Michal Nazarewicz
2014-05-08  0:32 ` [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used Joonsoo Kim
2014-05-09 15:45   ` Michal Nazarewicz
2014-05-12 17:04   ` Laura Abbott
2014-05-13  1:14     ` Joonsoo Kim
2014-05-13  3:05     ` Minchan Kim
2014-05-24  0:57     ` Laura Abbott
2014-05-26  2:44       ` Joonsoo Kim
2014-05-13  3:00   ` Minchan Kim
2014-05-15  1:53     ` Joonsoo Kim
2014-05-15  2:43       ` Minchan Kim
2014-05-19  2:11         ` Joonsoo Kim
2014-05-19  2:53           ` Minchan Kim
2014-05-19  4:50             ` Joonsoo Kim
2014-05-19 23:18               ` Minchan Kim
2014-05-20  6:33                 ` Joonsoo Kim
2014-05-15  2:45       ` Heesub Shin
2014-05-15  5:06         ` Minchan Kim
2014-05-19 23:22         ` Minchan Kim
2014-05-16  8:02       ` [RFC][PATCH] CMA: drivers/base/Kconfig: restrict CMA size to non-zero value Gioh Kim
2014-05-16 17:45         ` Michal Nazarewicz
2014-05-19  1:47           ` Gioh Kim
2014-05-19  5:55             ` Joonsoo Kim
2014-05-19  9:14               ` Gioh Kim
2014-05-19 19:59               ` Michal Nazarewicz
2014-05-20  0:50                 ` Gioh Kim
2014-05-20  1:28                   ` Michal Nazarewicz
2014-05-20  2:26                     ` Gioh Kim
2014-05-20 18:15                       ` Michal Nazarewicz
2014-05-20 11:38                   ` Marek Szyprowski
2014-05-21  0:15                     ` Gioh Kim
2014-05-14  8:42   ` [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used Aneesh Kumar K.V
2014-05-15  1:58     ` Joonsoo Kim
2014-05-18 17:36       ` Aneesh Kumar K.V
2014-05-19  2:29         ` Joonsoo Kim
2014-05-08  0:32 ` [RFC PATCH 3/3] CMA: always treat free cma pages as non-free on watermark checking Joonsoo Kim
2014-05-09 15:46   ` Michal Nazarewicz
2014-05-09 12:39 ` [RFC PATCH 0/3] Aggressively allocate the pages on cma reserved memory Marek Szyprowski
2014-05-13  2:26   ` Joonsoo Kim
2014-05-14  9:44     ` Aneesh Kumar K.V
2014-05-15  2:10       ` Joonsoo Kim
2014-05-15  9:47         ` Mel Gorman
2014-05-19  2:12           ` Joonsoo Kim

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).