]> git.kernelconcepts.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, 6 Oct 2011 06:00:12 +0000 (17:00 +1100)
commit5122b33203b9e414b4da26cf907fa88017a0b361
tree0edb5835149c59bf81c25ec5e07c966a1bf32594
parent23d87d83b60ee70f565b1eea0136bf78eaeaa985
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