diff options
author | John Hubbard <[email protected]> | 2020-08-24 14:11:25 -0700 |
---|---|---|
committer | Jens Wiklander <[email protected]> | 2020-08-25 11:01:06 +0200 |
commit | 4300cd6374a5192a2c8122a4a48ed647bdcb0214 (patch) | |
tree | 885e9e54c2eb2cfb1cec51c65776cb61f5e5d17f /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff) |
tee: convert get_user_pages() --> pin_user_pages()
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.
Factor out a new, small release_registered_pages() function, in
order to consolidate the logic for discerning between
TEE_SHM_USER_MAPPED and TEE_SHM_KERNEL_MAPPED pages. This also
absorbs the kfree() call that is also required there.
There is some helpful background in [2]: basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Cc: Jens Wiklander <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: John Hubbard <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions