linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: Micro-optimize direct IO submission path
@ 2011-06-22 19:18 Andi Kleen
  2011-06-22 19:18 ` [PATCH 1/6] DIO: Separate fields only used in the submission path from struct dio Andi Kleen
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Andi Kleen @ 2011-06-22 19:18 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel, dehrenberg

Inspired by the recent fast path DIO patch from Daniel
Ehrenberg.

I spent some time micro optimizing the "slow" direct IO submission 
part.  This should get rid of large parts of the memset and dio
access costs that Dan noticed.

I moved everything that isn't needed in the completion handler
back into the stack, to make it more likely it's cache hot.

It also inlines everything to allow the compiler to optimize more.
In particular it can split up the sdio structure into individual
variables now and then get rid of unnecessary initializations.
This costs some text size, but I think it's worth for such a hot 
path.

And the dio is a slab now, which avoids some fast path overhead.

Dan, could you please test this patch in your test case, comparing against
the fast path again?

Please test with CONFIG_CC_OPTIMIZE_FOR_SIZE and CONFIG_OPTIMIZE_INLINING
both disabled.

Thanks,

-Andi

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-07-27 21:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 19:18 RFC: Micro-optimize direct IO submission path Andi Kleen
2011-06-22 19:18 ` [PATCH 1/6] DIO: Separate fields only used in the submission path from struct dio Andi Kleen
2011-06-22 19:18 ` [PATCH 2/6] DIO: Fix a wrong comment Andi Kleen
2011-06-22 19:18 ` [PATCH 3/6] DIO: Rearrange fields in dio/dio_submit to avoid holes Andi Kleen
2011-06-22 19:18 ` [PATCH 4/6] DIO: Use a slab cache for struct dio Andi Kleen
2011-06-22 19:18 ` [PATCH 5/6] DIO: Separate map_bh from dio Andi Kleen
2011-06-22 19:59   ` Christoph Hellwig
2011-06-22 19:18 ` [PATCH 6/6] DIO: Inline the complete submission path Andi Kleen
2011-06-22 19:59   ` Christoph Hellwig
2011-06-22 20:10     ` Andi Kleen
2011-06-23 10:35       ` Christoph Hellwig
2011-07-27 21:06 ` RFC: Micro-optimize direct IO " Christoph Hellwig
2011-07-27 21:35   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).