diff options
| author | Peter Xu <[email protected]> | 2020-09-25 22:25:57 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-09-27 18:21:35 +0000 |
| commit | 008cfe4418b3dbda2ff820cdd7b1a5ce458ae444 (patch) | |
| tree | fecd1175184b14d889738d6491a1cccf0b0a8ae5 /drivers/usb/cdns3/cdns3-imx.c | |
| parent | Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/... (diff) | |
| download | kernel-008cfe4418b3dbda2ff820cdd7b1a5ce458ae444.tar.gz kernel-008cfe4418b3dbda2ff820cdd7b1a5ce458ae444.zip | |
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 <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions
