projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4f8030
)
dm cache: add cond_resched() to various workqueue loops
author
Mike Snitzer
<snitzer@kernel.org>
Thu, 16 Feb 2023 20:31:08 +0000
(15:31 -0500)
committer
Mike Snitzer
<snitzer@kernel.org>
Fri, 17 Feb 2023 19:49:12 +0000
(14:49 -0500)
Otherwise on resource constrained systems these workqueues may be too
greedy.
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-cache-target.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-cache-target.c
b/drivers/md/dm-cache-target.c
index 23195701dc15371c1cdc93acd203cc6c9c3587ee..dbbcfa580078b2c6731e61538de492775c77249d 100644
(file)
--- a/
drivers/md/dm-cache-target.c
+++ b/
drivers/md/dm-cache-target.c
@@
-1829,6
+1829,7
@@
static void process_deferred_bios(struct work_struct *ws)
else
commit_needed = process_bio(cache, bio) || commit_needed;
+ cond_resched();
}
if (commit_needed)
@@
-1852,6
+1853,7
@@
static void requeue_deferred_bios(struct cache *cache)
while ((bio = bio_list_pop(&bios))) {
bio->bi_status = BLK_STS_DM_REQUEUE;
bio_endio(bio);
+ cond_resched();
}
}
@@
-1892,6
+1894,8
@@
static void check_migrations(struct work_struct *ws)
r = mg_start(cache, op, NULL);
if (r)
break;
+
+ cond_resched();
}
}