From: Tejun Heo <tj@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: hmajxxlh@corbac.com, fuse-devel@lists.sourceforge.net,
mszeredi@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [fuse-devel] OSS Proxy Jack slave
Date: Thu, 10 Jun 2010 13:23:37 +0200 [thread overview]
Message-ID: <4C10CB39.70002@kernel.org> (raw)
In-Reply-To: <E1OMICc-0005f8-G5@pomaz-ex.szeredi.hu>
Hello, Miklos.
On 06/09/2010 12:08 PM, Miklos Szeredi wrote:
> I thought a bit about mmap in the last couple of days, and here's what
> I came up with. This week I'll take a stab at implementing some of
> this (as a hack week project, let's say :).
Cool. :-)
> First, I think server side mmap might be nice to have but not strictly
> necessary. I looked at osspd and it just memcopies in and out of the
> mmaped ring buffer. Replacing those memcopies with explicit syscalls
> to get and put the data should work fine. I doubt that the latency or
> CPU overhead introduced by the syscalls would actually matter in
> practice.
The latency and CPU overhead perse aren't problematic and for osspd,
copying in and out should be just fine as all update events are
clearly denoted.
> So we have the problem of how to do server initiated data transfer
> to/from kernel buffers. We could introduce the following
> "notifications", which are initiated by the filesystem:
>
> store request
> u64 nodeid
> u64 offset
> u32 size
> u32 padding
> data...
>
> retrieve request:
> u64 request_id
> u64 nodeid
> u64 offset
> u32 size
> u32 padding
>
> retrieve reply:
> u64 request_id
> data...
>
> Notice the asymmetry, store doesn't need a reply but retrieve does.
> Which is unfortunate as it makes it harder to impelent on both the
> kernel side and the server side.
How does the kernel know when to issue store or retrieve?
> Next thing is how to deal with multiple buffers for each char device.
> For the above to continue to work we need to make sure there's a
> separate nodeid associated with each buffer. The most general thing
> would be if MMAP reply contained a nodeid which identified the buffer.
>
> Do you see any issues with the above?
It relates to the previous question but mmap can also be used without
all updates being notified by some kind of event where the server is
expected to watch the mmapped area and react which is okay if server
can share the mapped page but if it has to poll by copying data out of
kernel buffer each time, it can get prohibitively expensive unless it
can ask kernel "what changes since when?" which would be pretty nasty
to implement.
Thanks.
--
tejun
next prev parent reply other threads:[~2010-06-10 11:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100601092456.GA23572@alia.nute.net>
[not found] ` <4C066CF4.2050902@gmail.com>
[not found] ` <20100605085045.GA5630@alia.nute.net>
2010-06-05 9:05 ` OSS Proxy Jack slave Tejun Heo
2010-06-09 10:08 ` [fuse-devel] " Miklos Szeredi
2010-06-10 11:23 ` Tejun Heo [this message]
2010-06-10 11:52 ` Miklos Szeredi
2010-06-10 13:13 ` Tejun Heo
2010-06-10 13:28 ` Miklos Szeredi
2010-06-10 15:26 ` Tejun Heo
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=4C10CB39.70002@kernel.org \
--to=tj@kernel.org \
--cc=fuse-devel@lists.sourceforge.net \
--cc=hmajxxlh@corbac.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
/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