public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@ximian.com>
To: dsaxena@plexity.net
Cc: Michael Clark <michael@metaparadigm.com>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] kernel events layer
Date: Sat, 24 Jul 2004 14:13:10 -0400	[thread overview]
Message-ID: <1090692790.12088.16.camel@localhost> (raw)
In-Reply-To: <20040724175442.GA26222@plexity.net>

On Sat, 2004-07-24 at 10:54 -0700, Deepak Saxena wrote:

> Oh ok, that makes much more sense now. "arch/kerne/cpu" is the
> name of the file, from which that message came.

Yah.  It is pretty simple and it gives us a unique name without imposing
any naming policy.

I have, however, been thinking about using kobject paths. ;-)  I
actually like the idea now, but I do not think we can get a kobject for
most of the stuff we need, unfortunately.  Also, we need the kobject
name to be unique.  This is an interesting concept to keep in mind,
though.

> I think we agree.  So are there some existing docs that you/Ximian has 
> on reccomended usage and object naming? I didn't see anything on 
> freedesktop.org.  That's where a lot of my questions are coming from. We 
> have this really simple events system, but how do we expect it to be used
> in the kernel.

No, we don't have any usage recommendations.  Going forward, this is
something we all need to work on and agree with.

All I want is a way to get events to user-space asynchronously without
any hacks.  This fits the bill nicely.  ;-)

That said, I do have some basic ideas about usage.  I see two main uses,
asynchronous events (such as, filesystem mounted) and the more specific
case of errors (such as device failure).

Criteria for adding the event would be that user-space needs to know
about it, and would normally have to poll to get the information.  If
the event is so non-important that right now no one even knows about it
or cares about it, it may not be worth adding.

But let's look at filesystem mounted, since many user-space applications
are interested in this.  Right now, they poll /proc/mtab every few
seconds, parse it, and look for changes.  Gross, right?

So we can create an event in fs/mount.c, say "/org/kernel/fs/mount" with
the signal "change".  The payload could be a simple "mounted" and
"unmounted" or the exact details on what was mounted or unmounted or
even nothing.  I'd prefer to give no information and just have the event
cause a re-read of /proc/mtab.  But whatever.

So we want up with, in do_mount,

	send_kevent (KEVENT_FS, "/org/kernel/fs/mount",
		     "change", "mounted");

Or similar.

	Robert Love



  reply	other threads:[~2004-07-24 18:13 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23 17:41 [patch] kernel events layer Robert Love
2004-07-23 18:25 ` Tim Hockin
2004-07-23 18:31 ` Muli Ben-Yehuda
2004-07-23 18:35   ` Robert Love
2004-07-23 21:32 ` Dan Aloni
2004-07-24  2:47   ` Robert Love
2004-07-24  4:42     ` Keith Owens
2004-07-24  5:00       ` Robert Love
2004-07-24  8:11         ` Andrew Morton
2004-07-24  5:37           ` Robert Love
2004-07-24  6:02             ` Robert Love
2004-07-24  9:43               ` Wichert Akkerman
2004-07-24 20:21               ` James Morris
2004-07-25  2:12                 ` Robert Love
2004-07-24  6:53       ` Paul Jackson
2004-07-24 11:37       ` Bernd Petrovitsch
2004-07-24  3:02 ` Michael Clark
2004-07-24  3:14   ` Robert Love
2004-07-24  9:15     ` Michael Clark
2004-07-24 15:08     ` Deepak Saxena
2004-07-24 15:45       ` Robert Love
2004-07-24 17:33         ` Ryan Anderson
2004-07-24 17:46         ` Tim Hockin
2004-07-24 18:19           ` Robert Love
2004-07-25 18:11             ` Tim Hockin
2004-07-25 19:08               ` Robert Love
2004-07-27  5:09                 ` Daniel Stekloff
2004-07-24 17:54         ` Deepak Saxena
2004-07-24 18:13           ` Robert Love [this message]
2004-07-26 20:08             ` Rutger Nijlunsing
2004-07-26 20:10               ` Robert Love
2004-08-09 13:29     ` Pavel Machek
2004-08-09 19:47       ` Robert Love
2004-07-24  3:03 ` Andrew Morton
2004-07-24  2:14   ` Robert Love
2004-07-24  5:15     ` Chris Wedgwood
2004-07-24  5:41       ` Robert Love
2004-07-24  5:45         ` Chris Wedgwood
2004-07-24  3:11   ` [patch] kernel events layer, updated Robert Love
2004-07-24  7:58     ` Deepak Saxena
2004-07-24  8:23       ` Deepak Saxena
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26  6:04 [patch] kernel events layer Perez-Gonzalez, Inaky
2004-07-26  6:09 ` Andrew Morton
2004-07-26 23:00   ` Matt Mackall
2004-07-26  7:31 Perez-Gonzalez, Inaky
2004-07-26 14:50 ` Robert Love
2004-07-26 16:12   ` Greg KH
2004-07-26 18:13     ` Oliver Neukum
2004-07-26 18:15       ` Robert Love
2004-07-26 19:03       ` Greg KH
2004-07-26 20:44         ` Tim Hockin
2004-07-27 18:15           ` Mike Waychison
2004-07-27 18:35             ` Oliver Neukum
2004-07-27 18:37             ` Tim Hockin
2004-07-26 22:58 Perez-Gonzalez, Inaky
2004-07-27  7:08 ` Deepak Saxena

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=1090692790.12088.16.camel@localhost \
    --to=rml@ximian.com \
    --cc=akpm@osdl.org \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@metaparadigm.com \
    /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