From: Florian Fainelli <florian@openwrt.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Tony Ibbs <tibs@tonyibbs.co.uk>,
Grant Likely <grant.likely@secretlab.ca>,
lkml <linux-kernel@vger.kernel.org>,
"Linux-embedded" <linux-embedded@vger.kernel.org>,
Tibs at Kynesim <tibs@kynesim.co.uk>,
Richard Watts <rrw@kynesim.co.uk>
Subject: Re: [PATCH 00/11] RFC: KBUS messaging subsystem
Date: Tue, 17 May 2011 10:50:38 +0200 [thread overview]
Message-ID: <201105171050.38903.florian@openwrt.org> (raw)
In-Reply-To: <20110322133640.5d5c88e4@bike.lwn.net>
Hello,
Sorry for this late answer.
On Tuesday 22 March 2011 20:36:40 Jonathan Corbet wrote:
> On Fri, 18 Mar 2011 17:21:09 +0000
>
> Tony Ibbs <tibs@tonyibbs.co.uk> wrote:
> > KBUS is a lightweight, Linux kernel mediated messaging system,
> > particularly intended for use in embedded environments.
>
> I've spent a bit of time looking at this code...this isn't a detailed
> review by any stretch, more like a few impressions.
>
> - Why kbus over, say, a user-space daemon and unix-domain sockets? I'm
> not sure I see the advantage that comes with putting this into kernel
> space.
I also fail to see why this would be required. In my opininon you are trading
the reliability over complexity by putting this in the kernel.
Most implementations (if not all) involving system-wide message delivery for
other daemons are running in user-space. Having a daemon for message delivery
to other kbus clients/servers does not not seem less reliable to me. If you
had in mind that this daemon might be killed under OOM conditions, then maybe
your whole system has an issue, issue which could be circumvented by making
sure the messaging process gets respawned when possible (upstart like
mechanism or such).
>
> - The interface is ... creative. If you have to do this in kernel space,
> it would be nice to do away with the split write()/ioctl() API for
> reading or writing messages. It seems like either a write(), OR an
> ioctl() with a message data pointer would suffice; that would cut the
> number of syscalls the applications need to make too.
>
> Even better might be to just use the socket API.
Indeed, I would also suggest having a look at what generic netlink already
provides like messages per application PID, multicasting and marshaling. If
you intend to keep a part of it in the kernel, you should have a look at this,
because from my experience with generic netlink, most of the hard job you are
re-doing here, has already been done in a generic manner.
>
> - Does anything bound the size of a message fed into the kernel with
> write()? I couldn't find it. It seems like an application could
> consume arbitrary amounts of kernel memory.
>
> - It would be good to use the kernel's dynamic debugging and tracing
> facilities rather than rolling your own.
>
> - There's lots of kmalloc()/memset() pairs that could be kzalloc().
>
> That's as far as I could get for now.
>
> Thanks,
>
> jon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-05-17 8:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 17:21 [PATCH 00/11] RFC: KBUS messaging subsystem Tony Ibbs
2011-03-18 17:21 ` [PATCH 01/11] Documentation for KBUS Tony Ibbs
2011-03-18 17:21 ` [PATCH 02/11] KBUS external header file Tony Ibbs
2011-03-18 17:21 ` [PATCH 03/11] KBUS internal " Tony Ibbs
2011-03-18 17:21 ` [PATCH 04/11] KBUS main source file, basic device support only Tony Ibbs
2011-03-18 17:21 ` [PATCH 05/11] KBUS add support for messages Tony Ibbs
2011-03-18 17:21 ` [PATCH 06/11] KBUS add ability to receive messages only once Tony Ibbs
2011-03-18 17:21 ` [PATCH 07/11] KBUS add ability to add devices at runtime Tony Ibbs
2011-03-18 17:21 ` [PATCH 08/11] KBUS add Replier Bind Events Tony Ibbs
2011-03-18 17:21 ` [PATCH 09/11] KBUS Replier Bind Event set-aside lists Tony Ibbs
2011-03-18 17:21 ` [PATCH 10/11] KBUS report state to userspace Tony Ibbs
2011-03-18 17:21 ` [PATCH 11/11] KBUS configuration and Makefile Tony Ibbs
2011-03-22 19:36 ` [PATCH 00/11] RFC: KBUS messaging subsystem Jonathan Corbet
2011-03-23 23:13 ` Tony Ibbs
2011-03-24 18:03 ` James Chapman
2011-03-27 19:07 ` Tony Ibbs
2011-04-15 21:34 ` [PATCH] extra/1 Allow setting the maximum KBUS message size Tony Ibbs
2011-04-15 22:46 ` Jonathan Corbet
2011-04-18 14:01 ` Mark Brown
2011-04-19 19:33 ` Tony Ibbs
2011-05-17 8:50 ` Florian Fainelli [this message]
2011-05-22 19:58 ` [PATCH 00/11] RFC: KBUS messaging subsystem Tony Ibbs
2011-07-06 16:15 ` Florian Fainelli
2011-07-28 21:48 ` RFC: [Restatement] " Tony Ibbs
2011-07-28 23:58 ` Colin Walters
2011-08-03 20:14 ` Tony Ibbs
2011-08-07 16:47 ` Tony Ibbs
2011-08-03 20:48 ` Pekka Enberg
2011-08-07 20:24 ` Tony Ibbs
2011-08-15 11:46 ` Pekka Enberg
2011-08-21 13:28 ` Tony Ibbs
2011-08-22 1:15 ` Bryan Donlan
2011-08-29 8:55 ` Tony Ibbs
2011-08-03 20:23 ` [PATCH 00/11] RFC: " Tony Ibbs
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=201105171050.38903.florian@openwrt.org \
--to=florian@openwrt.org \
--cc=corbet@lwn.net \
--cc=grant.likely@secretlab.ca \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rrw@kynesim.co.uk \
--cc=tibs@kynesim.co.uk \
--cc=tibs@tonyibbs.co.uk \
/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