Peter Xu 008cfe4418 mm: Introduce mm_struct.has_pinned
(Commit message majorly collected from Jason Gunthorpe)

Reduce the chance of false positive from page_maybe_dma_pinned() by
keeping track if the mm_struct has ever been used with pin_user_pages().
This allows cases that might drive up the page ref_count to avoid any
penalty from handling dma_pinned pages.

Future work is planned, to provide a more sophisticated solution, likely
to turn it into a real counter.  For now, make it atomic_t but use it as
a boolean for simplicity.

Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-09-27 11:21:35 -07:00
..
2020-08-09 14:10:26 -07:00
2020-08-12 10:57:57 -07:00
2020-09-27 11:21:35 -07:00
2020-09-26 10:48:08 -07:00
2020-08-07 11:33:26 -07:00
2020-08-12 10:57:58 -07:00
2020-06-08 11:05:55 -07:00
2020-08-07 11:33:28 -07:00
2020-09-04 09:31:54 -07:00
2020-06-04 19:06:24 -07:00
2020-08-12 10:57:58 -07:00