linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus-BTH8mxji4b0@public.gmane.org>
To: Antonio SJ Musumeci <trapexit-wGTF+nt6ur047o9RxwvyTQ@public.gmane.org>
Cc: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	fuse-devel
	<fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Greg KH
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Nikhilesh Reddy <reddyn-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-fsdevel
	<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
	sven.utcke-Mmb7MZpHnFY@public.gmane.org,
	Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org>,
	Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] fuse: Add support for fuse stacked I/O
Date: Fri, 15 Jan 2016 09:51:50 -0800	[thread overview]
Message-ID: <871t9i91e1.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <CAB3-ZyT+xcU-0BnNvq-+GsDe6W8=MCWwxguS-+KQ39gajmM5pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (Antonio SJ Musumeci's message of "Fri, 15 Jan 2016 12:37:28 -0500")

On Jan 15 2016, Antonio SJ Musumeci <trapexit-wGTF+nt6ur047o9RxwvyTQ@public.gmane.org> wrote:
> The idea is that you want to be able to reason about open, create, etc. but
> don't care about the data transfer.
>
> I have N filesystems I wish to unionize. When I create a new file I want to
> pick the drive with the most free space (or some other algo). creat is
> called, succeeds, and now the application issuing this starts writing. The
> FUSE fs doesn't care about the writes. It just wanted to pick the drive
> this file should have been created on. Anything I'd do with the FD after
> that I'm happy to short circuit. I don't need to be asked what to do when
> fstat'ing this FD or anything which in FUSE hands over the 'fh'. It's just
> a file descriptor for me and I'd simply be calling the same function.
>
> Ideally I think one would want to be able to select which functions to
> short circuit and maybe even have it so that a short circuited function
> could propagate back through FUSE on error. But the read and write short
> circuiting is probably the biggest win given the overhead.


I think you should avoid using the term "stacked" completely (which
would also make Christoph happy). There have been several discussions in
the past about adding a "fd delegation" function to FUSE. Generally, the
idea is that the FUSE userspace code tells the FUSE kernel module to
internally "delegate" to writes and reads for a given file (or even a
range in that file) to a different file descriptor provided by
userspace.

I think that function would be useful, and not just for union file
systems. There are many FUSE file systems that end up writing the data
into some other file on the disk without doing any transformations on
the data itself. Especially with the range feature, they would all
benefit from the ability to delegate reads and writes.

However, Miklos has said in the past that the performance gain from this
is very small. You can get almost as good a result by splicing from one
fd to the other in userspace. In that case this function could actually
be implemented completely in libfuse.


Do you have any benchmark results that compare a splice-in-userspace
approach with your patch?


Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

  parent reply	other threads:[~2016-01-15 17:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <565394BE.4040506@codeaurora.org>
     [not found] ` <565394BE.4040506-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-01-13 23:53   ` [PATCH] fuse: Add support for fuse stacked I/O Nikhilesh Reddy
2016-01-14  4:57     ` Greg KH
2016-01-14 18:57       ` Nikhilesh Reddy
     [not found]         ` <5697EF97.9020800-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-01-14 19:19           ` Linus Torvalds
     [not found]             ` <CA+55aFwxaU0Y_UxyKFv6WaYsPWDDzZG-rhVtMuLSPcJ0WLLw2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-15 16:31               ` Andy Lutomirski
     [not found]                 ` <CALCETrWNQ9ytw1bCOOjFJRstauYc6DocQAmZCF61CErAJ5BF2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-15 17:37                   ` Antonio SJ Musumeci
     [not found]                     ` <CAB3-ZyT+xcU-0BnNvq-+GsDe6W8=MCWwxguS-+KQ39gajmM5pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-15 17:51                       ` Nikolaus Rath [this message]
2016-01-15 19:29                         ` Nikhilesh Reddy
     [not found]                           ` <56994884.9060002-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-01-15 21:38                             ` Nikolaus Rath
2016-01-15 21:43                           ` Linus Torvalds
2016-01-15 21:46                             ` Andy Lutomirski
     [not found]                               ` <CALCETrUA2veiBYYbN1hCSkHxBFyDpe3b=PXg=j53_ZuQBt1FUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-15 21:53                                 ` Linus Torvalds
2016-01-19  2:57                                   ` Nikhilesh Reddy
     [not found]                                     ` <569DA62B.7070701-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-01-20 23:24                                       ` Nikhilesh Reddy
2016-01-15 21:56                           ` [fuse-devel] " Hans Beckerus
     [not found]     ` <5696E366.2080605-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-01-14  8:25       ` Christoph Hellwig
2016-01-14 15:52         ` Nikolaus Rath
     [not found]           ` <87mvs8qhun.fsf-Zv899e0YUSYPWKMTL/zdXNi2O/JbrIOy@public.gmane.org>
2016-01-15  9:29             ` Christoph Hellwig
2016-01-19  3:07       ` Jann Horn
     [not found]         ` <CAK9i0=ojVmbuDiFXY_sHA12vTWgz9aKwEQuZmmYtUka3zqr=hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-20 23:07           ` Nikhilesh Reddy

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=871t9i91e1.fsf@thinkpad.rath.org \
    --to=nikolaus-bth8mxji4b0@public.gmane.org \
    --cc=fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org \
    --cc=reddyn-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=richard-/L3Ra7n9ekc@public.gmane.org \
    --cc=sven.utcke-Mmb7MZpHnFY@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=trapexit-wGTF+nt6ur047o9RxwvyTQ@public.gmane.org \
    --cc=tytso-3s7WtUTddSA@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).