Re: [patch] kernel events layer

From: Matt Mackall
Date: Mon Jul 26 2004 - 18:07:38 EST


On Sun, Jul 25, 2004 at 11:09:51PM -0700, Andrew Morton wrote:
> "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@xxxxxxxxx> wrote:
> >
> > If you guys are up to it, I volunteer to write/port such a tool to scan
> > out the send_kevent{_atomic,}()s and make a catalog out of it.
>
> I must say that my gut feeling here is that bolting an arbitrary new
> namespace into the kernel in this manner is not the way to proceed.

An uncontrolled namespace is no better than the existing printk info,
IMO. And I think it's next to impossible to control the kevent
namespace if it's scattered across the tree as strings, having tried
to do something analogous for another large project.

> I hope we'll hear more from Greg on this next week - see if we can come up
> with some way to use the kobject/sysfs namespace for this.

An API that looks like sysfs + dnotify to userspace is almost what you
want. While the sysfs namespace has some of the problems above, we're
already stuck with it.

> Although heaven knows how "tmpfs just ran out of space" would map onto
> kobject/sysfs.

Per mountpoint sysfs trees? I'm sure there are lifetime issues there.

Btw, we probably already have potential issues with kevents being
stale by the time userspace picks them up - eth0 up, eth0 down, eth1
renamed eth0, userspace notices eth0 up, tries to config downed eth1.

--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/