]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dio: inline the complete submission path
authorAndi Kleen <ak@linux.intel.com>
Wed, 28 Sep 2011 00:51:09 +0000 (10:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:51 +0000 (14:53 +1000)
commit6ed966cff0d28540ebd5d974a274e4382a31c880
tree9c10b4774fad7cf1b143522e929036974152b317
parentd9fb6b55693dd23097573788807665a8ac9c092c
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 <>
fs/direct-io.c