]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: Combine CIL insert and prepare passes
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Aug 2013 10:50:07 +0000 (20:50 +1000)
committerBen Myers <bpm@sgi.com>
Tue, 13 Aug 2013 21:20:09 +0000 (16:20 -0500)
commit991aaf65ff0addc2692cfa8dc1ff082dcf69d26f
treebe01d8b5f7ba7e51902a1d8efc8145bb9737948b
parentf5baac354db8b6abfe8ed4ff6b6c3438c42ea606
xfs: Combine CIL insert and prepare passes

Now that all the log item preparation and formatting is done under
the CIL lock, we can get rid of the intermediate log vector chain
used to track items to be inserted into the CIL.

We can already find all the items to be committed from the
transaction handle, so as long as we attach the log vectors to the
item before we insert the items into the CIL, we don't need to
create a log vector chain to pass around.

This means we can move all the item insertion code into and optimise
it into a pair of simple passes across all the items in the
transaction. The first pass does the formatting and accounting, the
second inserts them all into the CIL.

We keep this two pass split so that we can separate the CIL
insertion - which must be done under the CIL spinlock - from the
formatting. We could insert each item into the CIL with a single
pass, but that massively increases the number of times we have to
grab the CIL spinlock. It is much more efficient (and hence
scalable) to do a batch operation and insert all objects in a single
lock grab.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_log_cil.c