]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dio: separate fields only used in the submission path from struct dio
authorAndi Kleen <ak@linux.intel.com>
Wed, 28 Sep 2011 00:51:07 +0000 (10:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:50 +0000 (14:53 +1000)
commit75b2b7c443822d046ac4326ef3d886eea84d9089
tree999654c9bdc355daa05b14829f0aad711c53b7e0
parent088ca0d3c3377a6984d4dfb2599cfdd4c4539c94
dio: separate fields only used in the submission path from struct dio

This large, but largely mechanic, patch moves all fields in struct dio
that are only used in the submission path into a separate on stack data
structure.  This has the advantage that the memory is very likely cache
hot, which is not guaranteed for memory fresh out of kmalloc.

This also gives gcc more optimization potential because it can easier
determine that there are no external aliases for these variables.

The sdio initialization is a initialization now instead of memset.  This
allows gcc to break sdio into individual fields and optimize away
unnecessary zeroing (after all the functions are inlined)

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