Thread (17 messages) 17 messages, 6 authors, 2023-05-23

Re: [PATCH] tee: add FOLL_LONGTERM for CMA case when alloc shm

From: David Hildenbrand <hidden>
Date: 2023-05-17 18:24:25
Also in: linux-arm-kernel, linux-mm, lkml, op-tee

On 17.05.23 12:19, Sumit Garg wrote:
On Wed, 17 May 2023 at 15:06, Christoph Hellwig [off-list ref] wrote:
quoted
On Wed, May 17, 2023 at 02:56:13PM +0530, Sumit Garg wrote:
quoted
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...
In general: if user space controls it -> possibly forever -> long-term. 
Even if in most cases it's a short delay: there is no trusting on user 
space.

For example, iouring fixed buffers keep pages pinned until user space 
decides to unregistered the buffers -> long-term.

Short-term is, for example, something like O_DIRECT where we pin -> DMA 
-> unpin in essentially one operation.

-- 
Thanks,

David / dhildenb

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help