]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dio: inline the complete submission path
authorAndi Kleen <ak@linux.intel.com>
Wed, 5 Oct 2011 00:44:05 +0000 (11:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Oct 2011 06:50:03 +0000 (17:50 +1100)
commit24638b5f516f74143e5cc0622143beef6f527192
tree12b61cff1f2a87cd0be4a5c671be1ad8e9189919
parentc5a4a0ff7365291001fbb7187994cad4afa557d3
dio: inline the complete submission path

Add inlines to all the submission path functions.  While this increases
code size it also gives gcc a lot of optimization opportunities in this
critical hotpath.

In particular -- together with some other changes -- this allows gcc to
get rid of the unnecessary clearing of sdio at the beginning and optimize
the messy parameter passing.  Any non inlining of a function which takes a
sdio parameter would break this optimization because they cannot be done
if the address of a structure is taken.

Note that benefits are only seen with CONFIG_OPTIMIZE_INLINING and
CONFIG_CC_OPTIMIZE_FOR_SIZE both set to off.

This gives about 2.2% improvement on a large database benchmark with a
high IOPS rate.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/direct-io.c