[Ksummit-2012-discuss] Proposed discussion: In-kernel service management

David Howells dhowells at redhat.com
Thu Jun 21 19:10:03 UTC 2012


I would like to propose that the kernel performs part of the service management
of the system.  The reason for this is that some kernel services depend on some
userspace services as well as userspace services depending on kernelspace ones.

A prime example of this would be a network filesystem server.  It might want to
interact directly with userspace daemons (rpcbind).

Another example would be network filesystem that might need to interact
indirectly with, say, a network manager.

I would propose that a service record be limited to the minimum space required,
perhaps something like:

  - Class.
  - Name.
  - State.
  - Ownership.
  - Security context.
  - Initiator (kernel function, userspace spawner).
  - Operator (kernel function, userspace process).
  - Dependencies.
    - Requires.
    - Uses.
  - Dependees.

This way, the kernel can govern who can start and stop what via SELinux or
whatever, and can relate kernel services and user services to each other.

Also, there would need to be some way for message passing to occur.  This would
have to be secured/filtered by the kernel.  D-Bus could be used, but would have
to be kernelised, I think.

Feasibly, the service manager protocol wouldn't need to be much more than a
text command passing interface.

Example services could be:

 (1) /home mounted filesystem service.
      - Requires block-9:2 service.
      - Uses parent fs service.

 (2) Block-9:2 service.
      - Requires RAID manager service.
      - Uses block-65:2 service.
      - Uses block-66:2 service.
      - Uses block-67:2 service.

 (3) rpcbind service.
      - Requires network service.
      - Requires /usr service.
      - Requires /var/run service.

 (4) KDE display manager service.
      - Requires TTY service.
      - Requires graphics service.
      - Requires authentication service.
      - Requires /usr service.
      - Uses keyboard service.
      - Uses mouse service.

 (5) NTP service.
      - Requires network service.
      - Uses network route ipv4 default.
      - Uses network route ipv4 vpn.redhat.com.
      - Uses network route ipv6 default.
      - Uses network route ipv6 vpn.redhat.com.

David


More information about the Ksummit-2012-discuss mailing list