mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Dan Ehrenberg <dehrenberg@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] dio: Fast-path for page-aligned IOs
Date: Tue, 21 Jun 2011 13:41:07 -0700	[thread overview]
Message-ID: <m2oc1q3okc.fsf@firstfloor.org> (raw)
In-Reply-To: <1308611855-18096-1-git-send-email-dehrenberg@google.com> (Dan Ehrenberg's message of "Mon, 20 Jun 2011 16:17:35 -0700")

Dan Ehrenberg <dehrenberg@google.com> writes:

> This code introduces a fast-path variant of __blockdev_direct_IO
> for the special case where the request size is a multiple of the page
> size, the inode block size is a page, the user memory is page-aligned,
> the underlying storage is contiguous on disk and the file location is
> already initialized. The special case decreases the amount of
> bookkeeping required, which saves a significant amount of CPU time on
> a fast device such as a ramdisk or an SSD.  The patch is inspired by
> earlier code by Ken Chen.

Is it understood why your fast path is that much faster? 
i.e. what's the slow part in the normal path that it avoids?

I am wondering if some of the improvements could be gotten even for less
rigid pre conditions.

> +		/*
> +		 * The i_alloc_sem will be released at I/O completion,
> +		 * possibly in a different thread.
> +		 */
> +		down_read_non_owner(&inode->i_alloc_sem);

There's just a patch kit posted from hch which removes that semaphore.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2011-06-21 20:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 23:17 Dan Ehrenberg
2011-06-21 20:41 ` Andi Kleen [this message]
2011-06-21 21:21   ` Daniel Ehrenberg
2011-06-21 21:44     ` Andi Kleen
2011-07-27 21:08 ` Christoph Hellwig
2011-07-27 21:14   ` Andrew Morton
2011-07-27 22:15     ` Jeff Moyer
2011-07-28 22:09   ` Daniel Ehrenberg
2011-07-28 22:10   ` Daniel Ehrenberg
  -- strict thread matches above, loose matches on Subject: below --
2011-06-20 22:44 Dan Ehrenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2oc1q3okc.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=dehrenberg@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®