diff options
| author | Sarthak Sharma <sarthak.sharma@arm.com> | 2026-09-01 14:04:52 +0530 |
|---|---|---|
| committer | David Hildenbrand (Arm) <david@kernel.org> | 2026-09-16 11:50:10 +0000 |
| commit | 65a79b9b693d8c7bd7e5e4865c02cce922a7cc50 (patch) | |
| tree | 61b06aa90e2c542637529ff2345f2f582a39b0d1 /tools/lib/python/kdoc/python_version.py | |
| parent | 44817a536aaa5bfac0d316242e93e489d0a69d5f (diff) | |
| download | linux-next-65a79b9b693d8c7bd7e5e4865c02cce922a7cc50.tar.gz linux-next-65a79b9b693d8c7bd7e5e4865c02cce922a7cc50.zip | |
mm/gup_test: report actual pinned bytes
__gup_test_ioctl() advances addr to the end of the current batch before
checking if GUP pinned the entire requested batch. If GUP pins more than
0 pages but less than the requested batch size, addr still advances by
the requested batch size.
The next iteration detects the partial pinning and breaks out of the loop.
Again gup->size is calculated using addr - gup->addr, so it also includes
the unpinned pages of the requested batch.
Calculate gup->size using the actual number of pages pinned multiplied
by PAGE_SIZE.
Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking")
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
Link: https://patch.msgid.link/20260901083452.115365-3-sarthak.sharma@arm.com
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
