All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Omar Sandoval <osandov@osandov.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-btrfs@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH 0/6] btrfs: implement swap file support
Date: Fri, 21 Nov 2014 02:06:57 -0800	[thread overview]
Message-ID: <20141121100657.GD8866@infradead.org> (raw)
In-Reply-To: <20141119072235.GA6541@mew>

On Tue, Nov 18, 2014 at 11:22:35PM -0800, Omar Sandoval wrote:
> Here's a nice little bit of insanity I put together in that direction --
> consider it a discussion point more than a patch. It does two things:
> 
> - Uses an ITER_BVEC iov_iter to do direct_IO for swap_readpage. This makes
>   swap_readpage a synchronous operation, but I think that's the best we can do
>   with the existing interface.

Note that ->read_iter for direct-io supports async I/O in general.  By
resurrecting some of the older attempts to do in-kernel aio this could
be made async easily.

> - Unless I'm missing something, there don't appear to be any instances of
>   ITER_BVEC | READ in the kernel, so the dio path doesn't know not to dirty
>   pages it gets that way. Dave Kleikamp and Ming Lei each previously submitted
>   patches doing this as part of adding an aio_kernel interface. (The NFS direct
>   I/O implementation doesn't know how to deal with these either, so this patch
>   actually breaks the only existing user of this code path, but in the interest
>   of keeping the patch short, I didn't try to fix it :)

Right, we'd need to look into.  Bonus points of allowing this as a zero
copy read.


Btw, in the long run I would much prefer killing of the current horrible
swap using bmap path in favor of an enhanced direct I/O path.

  reply	other threads:[~2014-11-21 10:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 10:36 [RFC PATCH 0/6] btrfs: implement swap file support Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 1/6] btrfs: convert uses of ->mapping and ->index to wrappers Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 2/6] btrfs: don't allow -C or +c chattrs on a swap file Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 3/6] btrfs: don't set ->private on swapcache pages Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 4/6] btrfs: don't check the cleancache for " Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 5/6] btrfs: don't mark extents used for swap as up to date Omar Sandoval
2014-11-17 10:36 ` [RFC PATCH 6/6] btrfs: enable swap file support Omar Sandoval
2014-11-17 15:48 ` [RFC PATCH 0/6] btrfs: implement " Christoph Hellwig
2014-11-19  7:22   ` Omar Sandoval
2014-11-21 10:06     ` Christoph Hellwig [this message]
2014-11-21 10:12       ` Omar Sandoval

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=20141121100657.GD8866@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=osandov@osandov.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.