aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAlex Williamson <[email protected]>2017-04-16 15:57:18 -0600
committerAlex Williamson <[email protected]>2017-04-18 15:01:15 -0600
commit80dbe1fbafbf469fd19862f0d400b769bff0ee46 (patch)
tree0e325bcf0e3990f28365485a146a2bae6467070a /tools/perf/scripts/python/export-to-postgresql.py
parent0cfef2b7410b64d7a430947e0b533314c4f97153 (diff)
vfio/type1: Prune vfio_pin_page_external()
With vfio_lock_acct() testing the locked memory limit under mmap_sem, it's redundant to do it here for a single page. We can also reorder our tests such that we can avoid testing for reserved pages if we're not doing accounting and let vfio_lock_acct() test the process CAP_IPC_LOCK. Finally, this function oddly returns 1 on success. Update to return zero on success, -errno on error. Since the function only pins a single page, there's no need to return the number of pages pinned. N.B. vfio_pin_pages_remote() can pin a large contiguous range of pages before calling vfio_lock_acct(). If we were to similarly remove the extra test there, a user could temporarily pin far more pages than they're allowed. Suggested-by: Kirti Wankhede <[email protected]> Suggested-by: Eric Auger <[email protected]> Reviewed-by: Kirti Wankhede <[email protected]> Reviewed-by: Peter Xu <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions