mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@us.ibm.com>
To: Kingsley Cheung <kingsley@aurema.com>
Cc: Tom Zanussi <zanussi@us.ibm.com>,
	Karim Yaghmour <karim@opersys.com>,
	linux-kernel@vger.kernel.org
Subject: Re: read() on relayfs channel returns premature 0
Date: Thu, 24 Mar 2005 13:11:39 -0600	[thread overview]
Message-ID: <16963.4331.617958.820012@tut.ibm.com> (raw)
In-Reply-To: <20050324012948.GC25134@aurema.com>

Kingsley Cheung writes:
 > On Wed, Mar 23, 2005 at 09:29:12AM -0600, Tom Zanussi wrote:
 > > kingsley@aurema.com writes:
 > >  > 
 > >  > Now I understand that this is not the latest release of relayfs (there
 > >  > are the redux patches, which I have yet to try).  Nonetheless I'd like

[...]

 > 
 > I've tested it on 2.6.10 with the pagg and relayfs patches from
 > 
 > http://www.opersys.com/ftp/pub/relayfs/patch-relayfs-2.6.10-050113 
 > 
 > and
 > 
 > ftp://oss.sgi.com/projects/pagg/download/linux-2.6.10-pagg.patch-4
 > 
 > read() gives me a zero still once about a page of data has been read.
 > 

Thanks - I've tried it out and haven't immediately been able to
reproduce the problem yet - I'll do some more pounding on it though
when I get the chance.

BTW, I just want to point out that there aren't any problems with
read() in the version of relayfs included in the -mm tree (i.e. the
'redux' version), since of course it doesn't support read().

I went ahead and did a quick port of your stuff to the new version of
relayfs, which you can find here:

http://prdownloads.sourceforge.net/dprobes/RelayfsModule-new.tar.bz2?download

There's a README in the tarball with some notes on building and
running it.  It includes both the kernel and user-side code, which makes
use of the relay-apps code and documentation found here (I've included
the necessary files in the RelayfsModule-new tarball so you don't have
to actually get this):

http://prdownloads.sourceforge.net/dprobes/relay-apps-0.2.tar.gz?download

Hopefully the new version will still be useful for what you're trying
to do, but it does differ in a couple important ways from the old
version, and points up the fact that the new relayfs really is now
much more specialized for high-volume applications -

- your old version used 'packet' mode with read().  The new relayfs
only supports 'bulk' mode with mmap(), which means it's not really
useful for notification of single events.  I'm not sure how important
that is for your application - if you're mainly interested in
collecting data, you can certainly use it even for low-volume
applications, but the events will be sent to user space in 'blocks'.
You can modify the user space app to process blocks of events as they
come in, and play around with buffer sizes to get them more often, but
it's not quite the same thing.

- your old version used a single buffer, while the new relayfs only
supports per-cpu buffers, which means you'd have to sort out the
events in user space and impose some ordering using timestamps for
instance if your data doesn't already have a natural ordering (BTW,
the new relayfs doesn't have an option any longer to do automatic
timestamping either).

I'll continue maintaining the old relayfs for existing users (so
thanks for the patch and the test code) so if the new version doesn't
fit your needs, you'll still have the old version to fall back on.

Thanks,

Tom






  parent reply	other threads:[~2005-03-24 19:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23  9:02 kingsley
2005-03-23 15:29 ` Tom Zanussi
2005-03-24  1:29   ` Kingsley Cheung
2005-03-24  6:56     ` Jan Engelhardt
2005-03-24 19:11     ` Tom Zanussi [this message]
2005-03-24 19:45       ` Jan Engelhardt
2005-03-25 12:27         ` Karim Yaghmour
2005-03-28 23:43       ` Kingsley Cheung
2005-04-18  1:29 ` Relayfs Question: Use of relay_reset(). Potential race? Kingsley Cheung
2005-04-18 15:56   ` Tom Zanussi
2005-04-19  0:40     ` Kingsley Cheung
2005-05-04  9:04       ` kingsley

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=16963.4331.617958.820012@tut.ibm.com \
    --to=zanussi@us.ibm.com \
    --cc=karim@opersys.com \
    --cc=kingsley@aurema.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

Powered by JetHome