]> 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, 5 Oct 2011 00:44:02 +0000 (11:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Oct 2011 06:50:02 +0000 (17:50 +1100)
commitd251f6a3b8e1fead6246f4ed488cadbea5ba6302
treecdb5e83bf2384cf20036c48de4f08dda07ae3d84
parent382263ff913c39e6bd8e035fae0309f0d36cfd55
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 <akpm@linux-foundation.org>
fs/direct-io.c