summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2022-08-10 16:16:34 -0400
committerMike Snitzer <snitzer@kernel.org>2022-08-11 11:10:42 -0400
commite3a7c2947b9e01b9cedd3f67849c0ae95f0fadfa (patch)
treec7710728a55e2a9b042beda3c95b6ab28cd609b8 /tools/perf/scripts/python/export-to-sqlite.py
parentb7f362d6413ebd0167ac5a9f09ad5dca5490ac1a (diff)
dm bufio: fix some cases where the code sleeps with spinlock held
Commit b32d45824aa7 ("dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag") added a "NO_SLEEP" mode, it replaces a mutex with a spinlock, and it is only usable when the device is in read-only mode (because the write path may be sleeping while holding the dm_bufio_client lock). However, there are still two points where the code could sleep even in read-only mode. One is in __get_unclaimed_buffer -> __make_buffer_clean. The other is in __try_evict_buffer -> __make_buffer_clean. These functions will call __make_buffer_clean which sleeps if the buffer is being read. Fix these cases so that if c->no_sleep is set __make_buffer_clean will not be called and the buffer will be skipped instead. Fixes: b32d45824aa7 ("dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions