]> git.baikalelectronics.ru Git - kernel.git/commit
dm writecache: add cond_resched to avoid CPU hangs
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 27 Mar 2020 11:22:36 +0000 (07:22 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 27 Mar 2020 18:36:50 +0000 (14:36 -0400)
commitf87d83b621ff74881798bb253ae1b2217d269240
tree6ef766b371023a1835c2eedf5f439e866d5d053d
parent9a2758734224afe5c9d23584ce184fe1aac8f4f7
dm writecache: add cond_resched to avoid CPU hangs

Initializing a dm-writecache device can take a long time when the
persistent memory device is large.  Add cond_resched() to a few loops
to avoid warnings that the CPU is stuck.

Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c