aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorJohn Hubbard <[email protected]>2020-05-26 11:27:09 -0700
committerMartin K. Petersen <[email protected]>2020-06-09 21:57:26 -0400
commit08e9cbe75facfe08b9017eca37c9f1c5a6490b4a (patch)
tree6a89f9c621f62475c710159249c9e4a47d441727 /tools/perf/scripts/python/export-to-sqlite.py
parent987db58737e26c3d995811fefef9632756ca7cec (diff)
scsi: st: Convert convert get_user_pages() --> pin_user_pages()
This code was using get_user_pages*(), in a "Case 1" scenario (Direct IO), 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. 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. Note that this effectively changes the code's behavior as well: it now ultimately calls set_page_dirty_lock(), instead of SetPageDirty().This is probably more accurate. As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [3] Also, this deletes one of the two FIXME comments (about refcounting), because there is nothing wrong with the refcounting at this point. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ [3] https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Cc: "Kai Mäkisara (Kolumbus)" <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: [email protected] Acked-by: Kai Mäkisara <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions