From: Sumit Garg <sumit.garg@linaro.org>
To: Christoph Hellwig <hch@infradead.org>,
Xiaoming Ding <xiaoming.ding@mediatek.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, fei.xu@mediatek.com,
srv_heupstream@mediatek.com, linux-mm@kvack.org
Subject: Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm
Date: Wed, 17 May 2023 15:49:00 +0530 [thread overview]
Message-ID: <CAFA6WYO+EpiECFxdVgmd-Ey9jq1Ybt78WupK_bW5+oDcW-soVQ@mail.gmail.com> (raw)
In-Reply-To: <ZGSgCZrg+RjAbGO1@infradead.org>
On Wed, 17 May 2023 at 15:06, Christoph Hellwig <hch@infradead.org> wrote:
>
> On Wed, May 17, 2023 at 02:56:13PM +0530, Sumit Garg wrote:
> > Do you mean a pinned user-space page can be paged out automatically?
>
> No, pinned pages can't be paged out.
>
> But a short term pin implies it will be release after a short delay,
> and it is feasible for wait for the pin to go away.
Okay, I see. I would be interested to know the ranges for that short
delay. I guess it may depend on how much memory pressure there is...
>
> For a long term pin waiting is not an option, and anyone wanting to
> do something with the pinned page that requires it to not be pinned
> must simply give up.
>
> > Just FYI, the underlying use-case for TEE registered shared memory is
> > that the references to pinned pages are provided to TEE implementation
> > to operate upon. This can happen over multiple syscalls and we want
> > the pinned pages to be always in RAM as otherwise the physical
> > addresses may change if they are paged out in between.
>
> That's a very use clear case for a long term pin.
...however, thanks for the insights.
@Xiaoming,
Please use the following fixes tag for the v2 along with extending the
commit description regarding the reliability provided by the long term
flag.
Fixes: 033ddf12bcf5 ("tee: add register user memory")
-Sumit
next prev parent reply other threads:[~2023-05-17 10:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230517031856.19660-1-xiaoming.ding@mediatek.com>
2023-05-17 7:34 ` Christoph Hellwig
2023-05-17 7:52 ` Sumit Garg
2023-05-17 8:08 ` Christoph Hellwig
2023-05-17 9:02 ` Xiaoming Ding (丁晓明)
2023-05-17 9:26 ` Sumit Garg
2023-05-17 9:36 ` Christoph Hellwig
2023-05-17 10:19 ` Sumit Garg [this message]
2023-05-17 18:23 ` David Hildenbrand
2023-05-18 4:20 ` FOLL_LONGTERM vs FOLL_EPHEMERAL " Christoph Hellwig
2023-05-18 6:08 ` Sumit Garg
2023-05-18 13:56 ` David Hildenbrand
2023-05-23 1:54 ` John Hubbard
2023-05-23 7:25 ` Lorenzo Stoakes
2023-06-13 5:30 ` Xiaoming Ding (丁晓明)
2023-06-13 8:48 ` Sumit Garg
2023-05-18 6:40 ` Xiaoming Ding (丁晓明)
2023-05-19 10:01 ` David Hildenbrand
2023-05-19 11:03 ` Sumit Garg
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=CAFA6WYO+EpiECFxdVgmd-Ey9jq1Ybt78WupK_bW5+oDcW-soVQ@mail.gmail.com \
--to=sumit.garg@linaro.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=fei.xu@mediatek.com \
--cc=hch@infradead.org \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=matthias.bgg@gmail.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=srv_heupstream@mediatek.com \
--cc=xiaoming.ding@mediatek.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