linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Laura Abbott <lauraa@codeaurora.org>
Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	zhuhui@xiaomi.com, iamjoonsoo.kim@lge.com, gioh.kim@lge.com,
	SeongJae Park <sj38.park@gmail.com>
Subject: Re: [LSF/MM TOPIC] Improving CMA
Date: Wed, 26 Nov 2014 15:46:20 +0900	[thread overview]
Message-ID: <20141126064620.GA10412@bbox> (raw)
In-Reply-To: <5473E146.7000503@codeaurora.org>

Hello Laura,

On Mon, Nov 24, 2014 at 05:54:14PM -0800, Laura Abbott wrote:
> There have been a number of patch series posted designed to improve various
> aspects of CMA. A sampling:
> 
> https://lkml.org/lkml/2014/10/15/623
> http://marc.info/?l=linux-mm&m=141571797202006&w=2
> https://lkml.org/lkml/2014/6/26/549
> 
> As far as I can tell, these are all trying to fix real problems with CMA but
> none of them have moved forward very much from what I can tell. The goal of
> this session would be to come out with an agreement on what are the biggest
> problems with CMA and the best ways to solve them.

Thanks for the proposal.
Yes, CMA has broken for a long time.

1. Memory allocation for CMA area -> Broken
2. Memory reclaim for CMA area -> Broken
3. CMA allocation latency -> Broken
4. CMA allocation success guarantee -> Broken.

I believe there is no real product to use vanilla CMA in mainline
without any hack.

Recently, there are some efforts to fix 1 but patchset I have seen hurt
allocator's hot path which is really not what I want. Instead, I suggested
to use movalbe zone. It would help 1 and 2 problem and make mm code simple
so I think it's worth to try before making mm code more bloat with CMA hooks.
https://lkml.org/lkml/2014/11/4/55

However, we don't have a nice idea to solve 3 and 4 still.
There were some trying to migrate CMA page out when someone try to pin
CMA page via GUP but it's not a perfect solution. We should take care of
indirect object dependency(ex, obj A gets obj B, obj B gets obj C)
so page located in obj C will not release until obj B release and
obj B doesn't relase until obj A released). It means we should
take care of get_page as well as GUP. It's terrible.

Recently, I and SeongJae posted GCMA(Guaranteed CMA) which is a idea
to solve above all problems. https://lkml.org/lkml/2014/10/15/623
But it apparently has tradeoff. So, our goal is to recommend GCMA
if you want to make sure fast allocation success. Or, use CMA
if you have fallback scheme of failure of allocation, if you
are okay to allocation latency(a few seconds) sometime, if you
should use really big contiguous memory.

Anyway, I have an interest on this topic and want to attend.

Thanks.

> 
> Thanks,
> Laura
> 
> -- 
> Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2014-11-26  6:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  1:54 [LSF/MM TOPIC] Improving CMA Laura Abbott
2014-11-25 11:32 ` [Lsf-pc] " Mel Gorman
2014-11-26  4:25   ` Gioh Kim
2014-11-26  5:56     ` SeongJae Park
2014-11-26  5:58     ` 答复: " 朱辉
2014-11-26 18:29     ` Laura Abbott
2014-11-26  6:46 ` Minchan Kim [this message]
2014-11-27  6:12 ` Joonsoo Kim
2014-11-27  7:43   ` Gioh Kim
2014-11-28  7:15     ` [LSF/MM ATTEND] " Gioh Kim
2014-11-28  7:13   ` Joonsoo Kim
2014-11-28  9:54     ` [Lsf-pc] " Jan Kara
2014-12-01  8:25       ` Joonsoo Kim
2014-11-30 23:54     ` Gioh Kim
2014-11-27  7:56 ` [LSF/MM TOPIC] " Wanpeng Li
2014-11-27 16:11   ` [Lsf-pc] " James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141126064620.GA10412@bbox \
    --to=minchan@kernel.org \
    --cc=gioh.kim@lge.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=sj38.park@gmail.com \
    --cc=zhuhui@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).