public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <zanussi@us.ibm.com>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Tom Zanussi <zanussi@us.ibm.com>, Andrew Morton <akpm@osdl.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, karim@opersys.com,
	varap@us.ibm.com, richardj_moore@uk.ibm.com
Subject: Re: Merging relayfs?
Date: Sun, 17 Jul 2005 10:52:34 -0500	[thread overview]
Message-ID: <17114.32450.420164.971783@tut.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0507171551390.3728@scrub.home>

Roman Zippel writes:
 > Hi,
 > 
 > On Thu, 14 Jul 2005, Tom Zanussi wrote:
 > 
 > > The netlink control channel seems to work very well, but I can
 > > certainly change the examples to use something different.  Could you
 > > suggest something?
 > 
 > It just looks like a complicated way to do an ioctl, a control file that 
 > you can read/write would be a lot simpler and faster.

You're right - in previous versions, we did use ioctl - we ended up
using netlink as it seemed like least offensive option to most people.
I'll try modifying the example code to use a control file or something
like that instead though.

 > 
 > >  > Looking through the patch there are still a few areas I'm concerned about:
 > >  > - the usage of atomic_t look a little silly, there is only a single 
 > >  > writer and probably needs some cache line optimisations
 > > 
 > > The only things that are atomic are the counts of produced and
 > > consumed buffers and these are only ever updated or read in the slow
 > > buffer-switch path.  They're atomic because if they weren't, wouldn't
 > > it be possible for the client to read an unfinished value if the
 > > producer was in the middle of updating it?
 > 
 > No.
 > 
 > >  > - I would prefer "unsigned int" over just "unsigned"
 > >  > - the padding/commit arrays can be easily managed by the client
 > > 
 > > Yes, I can move them out and update the examples to reflect that, but
 > > I thought that if this was something that most clients would need to
 > > do, it made some sense to keep it in relayfs and avoid duplication in
 > > the clients.
 > 
 > If a lot of clients needs this, there a different ways to do this, e.g. by 
 > introducing some helper functions that clients can use. This way you can 
 > keep the core simple and allow the client to modify its behaviour.

OK, I'll think about the best way to change this.

 > 
 > >  > - overwrite mode can be implemented via the buffer switch callback
 > > 
 > > The buffer switch callback is already where this is handled, unless
 > > you're thinking of something else - one of the first checks in the
 > > buffer switch is relay_buf_full(), which always returns 0 if the
 > > buffer is in overwrite mode.
 > 
 > I mean, relayfs doesn't has to know about this, the client itself can do 
 > it (e.g. via helper functions).

In a previous version, we did something like having the client pass
back a return value from the callback indicating whether or not to
continue or stop.  I can try doing something like that instead again.

Tom



  reply	other threads:[~2005-07-17 15:53 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  1:10 Merging relayfs? Tom Zanussi
2005-07-12  1:45 ` Andrew Morton
2005-07-12  2:17   ` Dave Airlie
2005-07-12  2:22   ` Tom Zanussi
2005-07-12  9:12     ` Baruch Even
2005-07-12  2:25 ` Christoph Hellwig
2005-07-12  2:34   ` Andrew Morton
2005-07-12  2:59     ` Karim Yaghmour
2005-07-14 13:26     ` Roman Zippel
2005-07-14 15:01       ` Tom Zanussi
2005-07-17 14:04         ` Roman Zippel
2005-07-17 15:52           ` Tom Zanussi [this message]
2005-07-18  5:17             ` Hareesh Nagarajan
2005-07-18 14:31               ` Tom Zanussi
2005-07-18 13:44             ` Steven Rostedt
2005-07-18 14:16               ` Roman Zippel
2005-07-18 14:32                 ` Karim Yaghmour
2005-07-18 15:20                   ` Roman Zippel
2005-07-18 15:58                     ` Tom Zanussi
2005-07-22 20:43                       ` Tom Zanussi
2005-07-22 23:19                         ` Karim Yaghmour
2005-07-23  2:31                           ` Tom Zanussi
2005-07-26  2:35                             ` Karim Yaghmour
2005-07-22 20:43                       ` Tom Zanussi
2005-07-18 14:36                 ` Steven Rostedt
2005-07-18 15:06                   ` Roman Zippel
2005-07-18 14:41               ` Tom Zanussi
2005-07-18  8:40         ` Richard J Moore
2005-07-12 13:03   ` Steven Rostedt
2005-07-12  3:05 ` Greg KH
2005-07-12  3:03   ` Karim Yaghmour
2005-07-12  3:24     ` Greg KH
2005-07-12  3:52       ` Karim Yaghmour
2005-07-12  4:30         ` Greg KH
2005-07-12  4:40           ` Karim Yaghmour
2005-07-12  5:23             ` Greg KH
2005-07-12 14:36               ` Steve Rotolo
2005-07-12  3:55       ` Tom Zanussi
2005-07-12  4:27         ` Greg KH
2005-07-12 14:01 ` Tomasz Kłoczko
2005-07-12 14:21   ` Baruch Even
2005-07-12 15:30     ` Tomasz Kłoczko
2005-07-12 15:16   ` Tom Zanussi
2005-07-12 15:44     ` Tomasz Kłoczko
2005-07-12 16:27       ` Tom Zanussi
2005-07-12 17:01         ` Tomasz Kłoczko
2005-07-12 17:23           ` Tom Zanussi
     [not found]             ` <Pine.BSO.4.62.0507121935500.6919@rudy.mif.pg.gda.pl>
     [not found]               ` <17108.1906.628755.613285@tut.ibm.com>
     [not found]                 ` <Pine.BSO.4.62.0507122026520.6919@rudy.mif.pg.gda.pl>
     [not found]                   ` <17108.5721.202275.377020@tut.ibm.com>
2005-07-12 19:29                     ` Tomasz Kłoczko
2005-07-12 20:44                       ` Vara Prasad
2005-07-12 21:02               ` Vara Prasad
2005-07-13 12:40                 ` Tomasz Kłoczko
2005-07-13 15:04                   ` Vara Prasad
2005-07-13 16:22                     ` Tomasz Kłoczko
2005-07-13  4:29           ` Vara Prasad
2005-07-13 13:47             ` Tomasz Kłoczko
2005-07-13 15:55               ` Karim Yaghmour
2005-07-13 15:56               ` Vara Prasad
2005-07-13 16:50                 ` Tomasz Kłoczko
2005-07-12 14:58 ` Jason Baron
2005-07-12 15:26   ` Tom Zanussi
2005-07-12 16:00     ` Steven Rostedt
2005-07-12 15:53   ` Steven Rostedt
2005-07-12 16:08     ` Tom Zanussi
2005-07-12 16:23       ` Steven Rostedt
2005-07-12 16:36         ` Tom Zanussi
2005-07-12 16:49           ` Steven Rostedt
2005-07-12 17:01             ` Tom Zanussi
2005-07-12 21:38               ` Tom Zanussi
2005-07-12 23:40                 ` Steven Rostedt
2005-07-12 23:55                   ` Andrew Morton
2005-07-13  0:08                     ` Steven Rostedt
2005-07-16 21:07 ` relayfs documentation sucks? bert hubert
2005-07-16 23:13   ` Tom Zanussi
2005-07-17  9:01     ` [PATCH] " bert hubert
2005-07-17 15:43       ` Tom Zanussi
2005-07-17 19:45         ` bert hubert
2005-07-17 20:47           ` Tom Zanussi
2005-07-18 13:27           ` Steven Rostedt
2005-07-20 21:27             ` Paul Jackson
2005-07-20 21:45               ` bert hubert
2005-07-21  0:31                 ` Paul Jackson
2005-07-22 20:01                 ` Paul Jackson
2005-07-22 20:33                   ` relayfs as infrastructure, ltt, systemtap, diskstat bert hubert
2005-07-23 18:53                     ` Christoph Hellwig
2005-07-23 18:53                   ` [PATCH] Re: relayfs documentation sucks? Christoph Hellwig
2005-07-25 23:47                     ` Karim Yaghmour
2005-07-26  5:15                       ` bert hubert
     [not found] <17107.6290.734560.231978@tut.ibm.com.suse.lists.linux.kernel>
     [not found] ` <20050712022537.GA26128@infradead.org.suse.lists.linux.kernel>
     [not found]   ` <20050711193409.043ecb14.akpm@osdl.org.suse.lists.linux.kernel>
2005-07-12  4:36     ` Merging relayfs? Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2005-07-13  8:13 Spirakis, Charles

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=17114.32450.420164.971783@tut.ibm.com \
    --to=zanussi@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardj_moore@uk.ibm.com \
    --cc=varap@us.ibm.com \
    --cc=zippel@linux-m68k.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