public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gioh Kim <gioh.kim@lge.com>
To: "Andrew Morton" <akpm@linux-foundation.org>,
	'김준수' <iamjoonsoo.kim@lge.com>,
	"Laura Abbott" <lauraa@codeaurora.org>,
	"Minchan Kim" <minchan@kernel.org>,
	"Michal Nazarewicz" <mina86@mina86.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>
Cc: "Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Mel Gorman" <mel@csn.ul.ie>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	이건호 <gunho.lee@lge.com>, "'Chanho Min'" <chanho.min@lge.com>
Subject: [PATCHv2] CMA/HOTPLUG: clear buffer-head lru before page migration
Date: Mon, 21 Jul 2014 11:33:41 +0900	[thread overview]
Message-ID: <53CC7C05.3060703@lge.com> (raw)

I removed checking migratetype of v1: https://lkml.org/lkml/2014/7/18/82.
Thanks a lot.


---------------------------- 8< ------------------------------
>From 95addf7f1644cde3a0944629ff5c6a8d6f43e5d6 Mon Sep 17 00:00:00 2001
From: Gioh Kim <gioh.kim@lge.com>
Date: Fri, 18 Jul 2014 13:40:01 +0900
Subject: [PATCH] CMA/HOTPLUG: clear buffer-head lru before page migration

The bh must be free to migrate a page at which bh is mapped.
The reference count of bh is increased when it is installed
into lru so that the bh of lru must be freed before migrating the page.

This frees every bh of lru. We could free only bh of migrating page.
But searching lru costs more than invalidating entire lru.

Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
---
 mm/page_alloc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b99643d4..c00dedf 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6369,6 +6369,8 @@ int alloc_contig_range(unsigned long start, unsigned long end,
        if (ret)
                return ret;

+       invalidate_bh_lrus();
+
        ret = __alloc_contig_migrate_range(&cc, start, end);
        if (ret)
                goto done;
--
1.7.9.5

             reply	other threads:[~2014-07-21  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21  2:33 Gioh Kim [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-31  2:22 [PATCHv2] CMA/HOTPLUG: clear buffer-head lru before page migration Gioh Kim
2014-07-31 22:57 ` Andrew Morton
2014-08-01  0:12   ` Gioh Kim
2014-08-06  7:37     ` Joonsoo 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=53CC7C05.3060703@lge.com \
    --to=gioh.kim@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=chanho.min@lge.com \
    --cc=gunho.lee@lge.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.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 \
    --cc=viro@zeniv.linux.org.uk \
    /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