Skip to content

Commit

Permalink
direct-io: separate fields only used in the submission path from stru…
Browse files Browse the repository at this point in the history
…ct 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>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Andi Kleen authored and root committed Oct 28, 2011
1 parent 62a3dde commit eb28be2
Showing 1 changed file with 201 additions and 188 deletions.
Loading

0 comments on commit eb28be2

Please sign in to comment.