From: "Wang Sheng-Hui" <shhuiw@foxmail.com>
To: akpm <akpm@linux-foundation.org>,
mgorman <mgorman@techsingularity.net>,
"iamjoonsoo.kim" <iamjoonsoo.kim@lge.com>
Cc: linux-mm <linux-mm@kvack.org>
Subject: Why __alloc_contig_migrate_range calls migrate_prep() at first?
Date: Wed, 1 Jun 2016 11:42:29 +0800 [thread overview]
Message-ID: <tencent_29E1A2CA78CE0C9046C1494E@qq.com> (raw)
Dear,
Sorry to trouble you.
I noticed cma_alloc would turn to __alloc_contig_migrate_range for allocating pages.
But __alloc_contig_migrate_range calls migrate_prep() at first, even if the requested page
is single and free, lru_add_drain_all still run (called by migrate_prep())?
Image a large chunk of free contig pages for CMA, various drivers may request a single page from
the CMA area, we'll get lru_add_drain_all run for each page.
Should we detect if the required pages are free before migrate_prep(), or detect at least for single
page allocation?
------------------
Regards,
Wang Sheng-HuiN§²æìr¸zǧu©²Æ {\béì¹»\x1c®&Þ)îÆi¢Ø^nr¶Ý¢j$½§$¢¸\x05¢¹¨è§~'.)îÄÃ,yèm¶ÿÃ\f%{±j+ðèצj)Z·
next reply other threads:[~2016-06-01 3:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 3:42 Wang Sheng-Hui [this message]
2016-06-01 7:40 ` Minchan Kim
2016-06-02 1:19 ` Wang Sheng-Hui
2016-06-02 2:22 ` Joonsoo Kim
2016-06-02 4:29 ` Minchan Kim
2016-06-02 6:29 ` Joonsoo Kim
2016-06-02 6:46 ` Minchan Kim
2016-06-01 12:11 Wang Sheng-Hui
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=tencent_29E1A2CA78CE0C9046C1494E@qq.com \
--to=shhuiw@foxmail.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
/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