]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 5 May 2020 10:32:22 +0000 (12:32 +0200)
commit76d9a8359b21107a211e2b7e05f769bf5f8dcb6f
treec0eec7a1cdb1b9339e6da6cfcb17b0136b6e1459
parent673e5c5c1617f0a5e6f504f7e5c5837c1ba33c11
dm writecache: add cond_resched to avoid CPU hangs

BugLink: https://bugs.launchpad.net/bugs/1873481
commit 1edaa447d958bec24c6a79685a5790d98976fd16 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/md/dm-writecache.c