From: Andrew Morton <akpm@linux-foundation.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Mel Gorman <mel@csn.ul.ie>, Michal Nazarewicz <mina86@mina86.com>,
Minchan Kim <minchan@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] mm: cma: allocate pages from CMA if NR_FREE_PAGES approaches low water mark
Date: Mon, 19 Nov 2012 12:43:27 -0800 [thread overview]
Message-ID: <20121119124327.20e008a0.akpm@linux-foundation.org> (raw)
In-Reply-To: <50AA526A.7080505@samsung.com>
On Mon, 19 Nov 2012 16:38:18 +0100
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Hello,
>
> On 11/14/2012 11:58 PM, Andrew Morton wrote:
> > On Mon, 12 Nov 2012 09:59:42 +0100
> > Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> >
> > > It has been observed that system tends to keep a lot of CMA free pages
> > > even in very high memory pressure use cases. The CMA fallback for movable
> > > pages is used very rarely, only when system is completely pruned from
> > > MOVABLE pages, what usually means that the out-of-memory even will be
> > > triggered very soon. To avoid such situation and make better use of CMA
> > > pages, a heuristics is introduced which turns on CMA fallback for movable
> > > pages when the real number of free pages (excluding CMA free pages)
> > > approaches low water mark.
>
> ...
>
> > erk, this is right on the page allocator hotpath. Bad.
>
> Yes, I know that it adds an overhead to allocation hot path, but I found
> no other
> place for such change. Do You have any suggestion where such change can
> be applied
> to avoid additional load on hot path?
Do the work somewhere else, not on a hot path? Somewhere on the page
reclaim path sounds appropriate. How messy would it be to perform some
sort of balancing at reclaim time?
--
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: Andrew Morton <akpm@linux-foundation.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Mel Gorman <mel@csn.ul.ie>, Michal Nazarewicz <mina86@mina86.com>,
Minchan Kim <minchan@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] mm: cma: allocate pages from CMA if NR_FREE_PAGES approaches low water mark
Date: Mon, 19 Nov 2012 12:43:27 -0800 [thread overview]
Message-ID: <20121119124327.20e008a0.akpm@linux-foundation.org> (raw)
In-Reply-To: <50AA526A.7080505@samsung.com>
On Mon, 19 Nov 2012 16:38:18 +0100
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Hello,
>
> On 11/14/2012 11:58 PM, Andrew Morton wrote:
> > On Mon, 12 Nov 2012 09:59:42 +0100
> > Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> >
> > > It has been observed that system tends to keep a lot of CMA free pages
> > > even in very high memory pressure use cases. The CMA fallback for movable
> > > pages is used very rarely, only when system is completely pruned from
> > > MOVABLE pages, what usually means that the out-of-memory even will be
> > > triggered very soon. To avoid such situation and make better use of CMA
> > > pages, a heuristics is introduced which turns on CMA fallback for movable
> > > pages when the real number of free pages (excluding CMA free pages)
> > > approaches low water mark.
>
> ...
>
> > erk, this is right on the page allocator hotpath. Bad.
>
> Yes, I know that it adds an overhead to allocation hot path, but I found
> no other
> place for such change. Do You have any suggestion where such change can
> be applied
> to avoid additional load on hot path?
Do the work somewhere else, not on a hot path? Somewhere on the page
reclaim path sounds appropriate. How messy would it be to perform some
sort of balancing at reclaim time?
next prev parent reply other threads:[~2012-11-19 20:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 8:59 [PATCH] mm: cma: allocate pages from CMA if NR_FREE_PAGES approaches low water mark Marek Szyprowski
2012-11-12 8:59 ` Marek Szyprowski
2012-11-14 22:58 ` Andrew Morton
2012-11-14 22:58 ` Andrew Morton
2012-11-19 15:38 ` Marek Szyprowski
2012-11-19 15:38 ` Marek Szyprowski
2012-11-19 20:43 ` Andrew Morton [this message]
2012-11-19 20:43 ` Andrew Morton
2012-11-20 0:01 ` Minchan Kim
2012-11-20 0:01 ` Minchan Kim
2012-11-20 14:49 ` Marek Szyprowski
2012-11-20 14:49 ` Marek Szyprowski
2012-11-20 15:41 ` Michal Nazarewicz
2012-11-20 15:41 ` Michal Nazarewicz
2012-11-21 1:05 ` Minchan Kim
2012-11-21 1:05 ` Minchan Kim
2012-11-21 13:07 ` Michal Nazarewicz
2012-11-21 13:25 ` Minchan Kim
2012-11-21 13:25 ` Minchan Kim
2012-11-21 15:50 ` Marek Szyprowski
2012-11-21 15:50 ` Marek Szyprowski
2012-11-23 4:42 ` Minchan Kim
2012-11-23 4:42 ` Minchan Kim
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=20121119124327.20e008a0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mel@csn.ul.ie \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
/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.