From: Haojian Zhuang <haojian.zhuang@gmail.com>
To: Christoph Lameter <cl@linux.com>
Cc: linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
m.szyprowski@samsung.com
Subject: Re: how to avoid allocating or freeze MOVABLE memory in userspace
Date: Sat, 14 Apr 2012 10:51:54 +0800 [thread overview]
Message-ID: <CAN1soZyQuiYU_1f0G0eDqF-9WwzjgSgmr3QBh8cpkF+r1r7HrA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1204131326170.15905@router.home>
On Sat, Apr 14, 2012 at 2:27 AM, Christoph Lameter <cl@linux.com> wrote:
> On Fri, 13 Apr 2012, Haojian Zhuang wrote:
>
>> I have one question on memory migration. As we know, malloc() from
>> user app will allocate MIGRATE_MOVABLE pages. But if we want to use
>> this memory as DMA usage, we can't accept MIGRATE_MOVABLE type. Could
>> we change its behavior before DMA working?
>
> MIGRATE_MOVABLE works fine for DMA. If you keep a reference from a device
> driver to user pages then you will have to increase the page refcount
> which will in turn pin the page and make it non movable for as long as you
> keep the refcount.
Hi Christoph,
Thanks for your illustration. But it's a little abstract. Could you
give me a simple example
or show me the code?
Best Regards
Haojian
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-04-14 2:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 14:35 how to avoid allocating or freeze MOVABLE memory in userspace Haojian Zhuang
2012-04-13 18:27 ` Christoph Lameter
2012-04-14 2:51 ` Haojian Zhuang [this message]
2012-04-16 13:55 ` Christoph Lameter
2012-04-18 7:36 ` Haojian Zhuang
2012-04-18 13:49 ` Christoph Lameter
2012-04-18 15:10 ` Marek Szyprowski
2012-05-11 13:27 ` Marek Szyprowski
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=CAN1soZyQuiYU_1f0G0eDqF-9WwzjgSgmr3QBh8cpkF+r1r7HrA@mail.gmail.com \
--to=haojian.zhuang@gmail.com \
--cc=cl@linux.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).