Re: [patch] kernel events layer

From: Tim Hockin (thockin_at_hockin.org)
Date: 07/24/04

  • Next message: Deepak Saxena: "Re: [patch] kernel events layer"
    Date:	Sat, 24 Jul 2004 10:46:36 -0700
    To: Robert Love <rml@ximian.com>
    
    

    On Sat, Jul 24, 2004 at 11:45:53AM -0400, Robert Love wrote:
    >
    > Not everything has a corresponding sysfs name, which really makes the
    > whole notion moot.

    The things that do can use it, though. Here's a place where inconsistency
    (if present) is pointless.1

    > I might not of been clear - path name of the file in the kernel source
    > tree. So if you add an event to fs/open.c the path is
    > "/org/kernel/fs/open". This is a pretty generic naming scheme that
    > ensures names will be unique within the kernel and will not conflict
    > with names outside the kernel (e.g. the global URI space of whatever is
    > used in user-space).

    This immediately strikes me as a really bad idea. Stuff moves between
    files. Two files might really want to signal an event from the same
    source.

    > "high" is only an arbitrary string if it is not standardized. If the
    > temperature event is defined to come from such and such an interface,
    > with such and such values, it is all very easy to use. I mean, this is
    > how object systems work today.

    As long as we're religious about making every subsystem standardize these
    names, it should be ok. Another reason to macro-ize. There are way too
    many people touching too much code that might take advantage of a generic
    kernel->user event to rely on soft rules.

    > > In the case of a file close, the object name is the file path and the
    > > attribute could be the ctime, but it needs more thinking.
    >
    > This is where the sysfs naming scheme breaks down. You now have two
    > different namespaces - kobjects and files on a filesystem. We really
    > need something a lot simpler. Let user-space map stuff around if we
    > want that.

    Assuming that we're going to be doing file notifications via this,
    wouldn't something like "/fs/file close /path/to/foo" be right(er)?

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


  • Next message: Deepak Saxena: "Re: [patch] kernel events layer"

    Relevant Pages

    • Re: 2.6 - sysfs sensor nameing inconsistency
      ... > kernel interface). ... > is currently available is sysfs. ... Then look at the device directory for the i2c-0 adapter: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC][PATCH 1 of 4] Configfs is really sysfs
      ... >> But it would be stupid to forbid users from creating directories in sysfs ... >> or to forbid kernel modules from directly tweaking a configfs namespace. ... Sysfs already has problems ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH 0/5] I8K driver facelift
      ... I've been trying to work out how to do this through dynamic sysfs ... selecting the right number of sensors to compile in seems arbitrary. ... It just doesn't seem like the Linux Kernel way of doing ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] dont allow / in class device names
      ... Bah, kernel API's should check there arguments. ... One of my peeve's about sysfs is ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • PROBLEM: Unable to add subdirectory: Ooops in sys_add_file, called from kobject_register
      ... I got an Ooops while trying to load a little kernel module I wrote. ... The module's sysfs handling/initialization is based on ... and x86_64 hardware. ... # ACPI Support ...
      (Linux-Kernel)