]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bcache: Fix a writeback performance regression
authorKent Overstreet <kmo@daterainc.com>
Wed, 31 Jul 2013 23:29:54 +0000 (16:29 -0700)
committerKent Overstreet <kmo@daterainc.com>
Mon, 19 Aug 2013 22:30:45 +0000 (15:30 -0700)
commit9d1414d230febf984a75f5328e90891cde1dcf7f
tree9f39080e164f51a164c934c2c41a450698f667ea
parent7735cad742ac13459a3251cc97a38dfc2f47a461
bcache: Fix a writeback performance regression

Background writeback works by scanning the btree for dirty data and
adding those keys into a fixed size buffer, then for each dirty key in
the keybuf writing it to the backing device.

When read_dirty() finishes and it's time to scan for more dirty data, we
need to wait for the outstanding writeback IO to finish - they still
take up slots in the keybuf (so that foreground writes can check for
them to avoid races) - without that wait, we'll continually rescan when
we'll be able to add at most a key or two to the keybuf, and that takes
locks that starves foreground IO. Doh.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
drivers/md/bcache/bcache.h
drivers/md/bcache/util.c
drivers/md/bcache/util.h
drivers/md/bcache/writeback.c