From: Michal Nazarewicz <mina86@mina86.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] CMA: call to putback_lru_pages
Date: Mon, 17 Dec 2012 23:24:14 +0100 [thread overview]
Message-ID: <xa1tlicwiagh.fsf@mina86.com> (raw)
In-Reply-To: <1355779504-30798-1-git-send-email-srinivas.pandruvada@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
[+marek]
On Mon, Dec 17 2012, Srinivas Pandruvada wrote:
> As per documentation and other places calling putback_lru_pages,
> on error only, except for CMA. I am not sure this is a problem
> for CMA or not.
If ret >= 0 than the list is empty anyway so the effect of this patch is
to save a function call. It's also true that other callers call it only
on error so __alloc_contig_migrate_range() is an odd man out here. As
such:
Acked-by: Michal Nazarewicz <mina86@mina86.com>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> mm/page_alloc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 83637df..5a887bf 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5802,8 +5802,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
> alloc_migrate_target,
> 0, false, MIGRATE_SYNC);
> }
> -
> - putback_movable_pages(&cc->migratepages);
> + if (ret < 0)
> + putback_movable_pages(&cc->migratepages);
> return ret > 0 ? 0 : ret;
> }
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2012-12-17 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 21:25 [PATCH] CMA: call to putback_lru_pages Srinivas Pandruvada
2012-12-17 22:24 ` Michal Nazarewicz [this message]
2012-12-18 9:58 ` Marek Szyprowski
2012-12-19 23:27 ` Andrew Morton
2012-12-20 15:13 ` Michal Nazarewicz
2012-12-20 18:59 ` 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=xa1tlicwiagh.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=srinivas.pandruvada@linux.intel.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.