This is a note to let you know that I've just added the patch titled
dm bufio: when done scanning return from __scan immediately
to the 3.17-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-bufio-when-done-scanning-return-from-__scan-immediately.patch
and it can be found in the queue-3.17 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 0e825862f3c04cee40e25f55680333728a4ffa9b Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <[email protected]>
Date: Wed, 1 Oct 2014 13:29:48 -0400
Subject: dm bufio: when done scanning return from __scan immediately
From: Mikulas Patocka <[email protected]>
commit 0e825862f3c04cee40e25f55680333728a4ffa9b upstream.
When __scan frees the required number of buffer entries that the
shrinker requested (nr_to_scan becomes zero) it must return. Before
this fix the __scan code exited only the inner loop and continued in the
outer loop -- which could result in reduced performance due to extra
buffers being freed (e.g. unnecessarily evicted thinp metadata needing
to be synchronously re-read into bufio's cache).
Also, move dm_bufio_cond_resched to __scan's inner loop, so that
iterating the bufio client's lru lists doesn't result in scheduling
latency.
Reported-by: Joe Thornber <[email protected]>
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/dm-bufio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -1473,9 +1473,9 @@ static long __scan(struct dm_bufio_clien
list_for_each_entry_safe_reverse(b, tmp, &c->lru[l], lru_list) {
freed += __cleanup_old_buffer(b, gfp_mask, 0);
if (!--nr_to_scan)
- break;
+ return freed;
+ dm_bufio_cond_resched();
}
- dm_bufio_cond_resched();
}
return freed;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.17/dm-bufio-when-done-scanning-return-from-__scan-immediately.patch
queue-3.17/framebuffer-fix-screen-corruption-when-copying.patch
queue-3.17/fs-make-cont_expand_zero-interruptible.patch
queue-3.17/framebuffer-fix-border-color.patch
queue-3.17/dm-bufio-update-last_accessed-when-relinking-a-buffer.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html