All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	linaro-mm-sig@lists.linaro.org,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Michal Nazarewicz <mina86@mina86.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 0/2] ARM: Remove lowmem limit for default CMA region
Date: Mon, 25 Aug 2014 10:26:00 +0900	[thread overview]
Message-ID: <20140825012600.GN17372@bbox> (raw)
In-Reply-To: <1408610714-16204-1-git-send-email-m.szyprowski@samsung.com>

Hello,

On Thu, Aug 21, 2014 at 10:45:12AM +0200, Marek Szyprowski wrote:
> Hello,
> 
> Russell King recently noticed that limiting default CMA region only to
> low memory on ARM architecture causes serious memory management issues
> with machines having a lot of memory (which is mainly available as high
> memory). More information can be found the following thread:
> http://thread.gmane.org/gmane.linux.ports.arm.kernel/348441/
> 
> Those two patches removes this limit letting kernel to put default CMA
> region into high memory when this is possible (there is enough high
> memory available and architecture specific DMA limit fits).

Agreed. It should be from the beginning because CMA page is effectly
pinned if it is anonymous page and system has no swap.

> 
> This should solve strange OOM issues on systems with lots of RAM
> (i.e. >1GiB) and large (>256M) CMA area.

I totally agree with the patchset although I didn't review code
at all.

Another topic:
It means it should be a problem still if system has CMA in lowmem
by some reason(ex, hardware limit or other purpose of CMA
rather than DMA subsystem)?

In that case, an idea that just popped in my head is to migrate
pages from cma area to highest zone because they are all
userspace pages which should be in there but not sure it's worth
to implement at this point because how many such cripple platform
are.

Just for the recording.

> 
> Best regards
> Marek Szyprowski
> Samsung R&D Institute Poland
> 
> 
> Marek Szyprowski (2):
>   mm: cma: adjust address limit to avoid hitting low/high memory
>     boundary
>   ARM: mm: don't limit default CMA region only to low memory
> 
>  arch/arm/mm/init.c |  2 +-
>  mm/cma.c           | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletion(-)
> 
> -- 
> 1.9.2
> 
> --
> 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>

WARNING: multiple messages have this Message-ID (diff)
From: minchan@kernel.org (Minchan Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] ARM: Remove lowmem limit for default CMA region
Date: Mon, 25 Aug 2014 10:26:00 +0900	[thread overview]
Message-ID: <20140825012600.GN17372@bbox> (raw)
In-Reply-To: <1408610714-16204-1-git-send-email-m.szyprowski@samsung.com>

Hello,

On Thu, Aug 21, 2014 at 10:45:12AM +0200, Marek Szyprowski wrote:
> Hello,
> 
> Russell King recently noticed that limiting default CMA region only to
> low memory on ARM architecture causes serious memory management issues
> with machines having a lot of memory (which is mainly available as high
> memory). More information can be found the following thread:
> http://thread.gmane.org/gmane.linux.ports.arm.kernel/348441/
> 
> Those two patches removes this limit letting kernel to put default CMA
> region into high memory when this is possible (there is enough high
> memory available and architecture specific DMA limit fits).

Agreed. It should be from the beginning because CMA page is effectly
pinned if it is anonymous page and system has no swap.

> 
> This should solve strange OOM issues on systems with lots of RAM
> (i.e. >1GiB) and large (>256M) CMA area.

I totally agree with the patchset although I didn't review code
at all.

Another topic:
It means it should be a problem still if system has CMA in lowmem
by some reason(ex, hardware limit or other purpose of CMA
rather than DMA subsystem)?

In that case, an idea that just popped in my head is to migrate
pages from cma area to highest zone because they are all
userspace pages which should be in there but not sure it's worth
to implement at this point because how many such cripple platform
are.

Just for the recording.

> 
> Best regards
> Marek Szyprowski
> Samsung R&D Institute Poland
> 
> 
> Marek Szyprowski (2):
>   mm: cma: adjust address limit to avoid hitting low/high memory
>     boundary
>   ARM: mm: don't limit default CMA region only to low memory
> 
>  arch/arm/mm/init.c |  2 +-
>  mm/cma.c           | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletion(-)
> 
> -- 
> 1.9.2
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo at kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email at kvack.org </a>

-- 
Kind regards,
Minchan Kim

  parent reply	other threads:[~2014-08-25  1:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21  8:45 [PATCH 0/2] ARM: Remove lowmem limit for default CMA region Marek Szyprowski
2014-08-21  8:45 ` Marek Szyprowski
2014-08-21  8:45 ` [PATCH 1/2] mm: cma: adjust address limit to avoid hitting low/high memory boundary Marek Szyprowski
2014-08-21  8:45   ` Marek Szyprowski
2014-08-24 13:34   ` Michal Nazarewicz
2014-08-24 13:34     ` Michal Nazarewicz
2014-08-21  8:45 ` [PATCH 2/2] ARM: mm: don't limit default CMA region only to low memory Marek Szyprowski
2014-08-21  8:45   ` Marek Szyprowski
2014-08-21  9:26   ` Daniel Drake
2014-08-21  9:26     ` Daniel Drake
2014-08-24 13:34   ` Michal Nazarewicz
2014-08-24 13:34     ` Michal Nazarewicz
2014-08-25  1:26 ` Minchan Kim [this message]
2014-08-25  1:26   ` [PATCH 0/2] ARM: Remove lowmem limit for default CMA region Minchan Kim
2014-08-25  8:00   ` Marek Szyprowski
2014-08-25  8:00     ` Marek Szyprowski
2014-08-25  8:18     ` Minchan Kim
2014-08-25  8:18       ` Minchan Kim
2014-08-25  8:33       ` Marek Szyprowski
2014-08-25  8:33         ` Marek Szyprowski
2014-08-26  2:43         ` Minchan Kim
2014-08-26  2:43           ` Minchan Kim
2014-08-26 12:34           ` Marek Szyprowski
2014-08-26 12:34             ` Marek Szyprowski
2014-08-27  0:36             ` Minchan Kim
2014-08-27  0:36               ` Minchan Kim
2014-08-27  1:42               ` Joonsoo Kim
2014-08-27  1:42                 ` Joonsoo Kim
2014-08-27  2:57                 ` Minchan Kim
2014-08-27  2:57                   ` Minchan Kim
2014-08-26 23:10 ` Andrew Morton
2014-08-26 23:10   ` Andrew Morton

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=20140825012600.GN17372@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.