From: Mikulas Patocka Date: Wed, 1 Oct 2014 17:29:48 +0000 (-0400) Subject: dm bufio: when done scanning return from __scan immediately X-Git-Tag: fixes-against-v3.18-rc2~51^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e825862f3c04cee40e25f55680333728a4ffa9b;p=pandora-kernel.git dm bufio: when done scanning return from __scan immediately 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 Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org # 3.2+ --- Reading git-diff-tree failed