From: Tom Zanussi <zanussi@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Tom Zanussi <zanussi@us.ibm.com>,
linux-kernel@vger.kernel.org, karim@opersys.com
Subject: Re: [PATCH 2/4] relayfs: Documentation for non-relay file support
Date: Wed, 9 Nov 2005 16:21:52 -0600 [thread overview]
Message-ID: <17266.30336.927121.984127@tut.ibm.com> (raw)
In-Reply-To: <20051109140055.1c83abae.akpm@osdl.org>
Andrew Morton writes:
> Tom Zanussi <zanussi@us.ibm.com> wrote:
> >
> > +relay_open() automatically creates files in the relayfs filesystem to
> > +represent the per-cpu kernel buffers; it's often useful for
> > +applications to be able to create their own files in the relayfs
> > +filesystem as well e.g. 'control' files used to communicate control
> > +information between the kernel and user sides of a relayfs
> > +application.
>
> What are the semantics of these control files? How does an application
> know that there's something new to be read from them? select() or poll()
> or blocking read()?
It's completely up to the client to define whatever file operations it
wants, which are passed in to relayfs_create_file(). The relayfs
example apps, for instance, read from these files whenever they're
notifed via the relay file poll implementation that there's a
sub-buffer ready. These are basically the same thing as proc or
debugfs files created by passing explicit file operations.
>
> Can userspace write to the control files? If so, what happens
in-kernel?
Yes, the client can supply a write() file op that does whatever it
wants to. For the relayfs examples, the write() implementation
updates the count of sub-buffers consumed, for instance.
Tom
prev parent reply other threads:[~2005-11-09 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 21:50 Tom Zanussi
2005-11-09 22:00 ` Andrew Morton
2005-11-09 22:21 ` Tom Zanussi [this message]
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=17266.30336.927121.984127@tut.ibm.com \
--to=zanussi@us.ibm.com \
--cc=akpm@osdl.org \
--cc=karim@opersys.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®