From: Bart Samwel <bart@samwel.tk>
To: Giuliano Pochini <pochini@denise.shiny.it>
Cc: Ashish sddf <buff_boulder@yahoo.com>,
Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Compiling C++ kernel module + Makefile
Date: Wed, 21 Jan 2004 18:16:42 +0100 [thread overview]
Message-ID: <400EB3FA.80202@samwel.tk> (raw)
In-Reply-To: <Pine.LNX.4.58.0401211748130.1567@denise.shiny.it>
Giuliano Pochini wrote:
> On Mon, 19 Jan 2004, Bart Samwel wrote:
>>But we're not talking about the base kernel here. We're not talking
>>about migrating the kernel to C++, or even modules that are part of the
>>Linux kernel source. We're talking about *independent modules*. The
>>kernel exports a module interface, and any binary driver that correctly
>>hooks into the interface of the running kernel (using the correct
>>calling conventions of the running kernel) and behaves properly (e.g.,
>>doesn't do stack unwinds over chunks of kernel functions etc.) can hook
>>into it and do useful work. If somebody has decided that it would be
>>worth it for his project to use C++ (without exceptions, rtti and the
>>whole shebang) then so be it, why should you care? It's just binary code
>>that hooks into the module interface, using the correct calling
>>conventions. It doesn't do dirty stuff -- no exceptions, no RTTI,
>>etcetera. It compiles into plain, module-interface conforming assembler,
>>that can be compiled with -- you guessed it -- 'as', the AT&T syntax
>>assembler. Yes, they're taking a risk. Their risk is that C++ can't
>>import the kernel headers, or that C++ might someday need runtime
>>support that cannot be ported into the kernel.
[...]
> Maybe the right solution is writing a module that provides a fast data
> path between the kernel and the userspace router.
Hmmm, I think that would be problematic. The throughput would probably
be relatively OK (it's perfectly feasible to stash a load of packets
into an mmapped area with zero copies and to have them all routed in
userspace) but the latency is a different story. A router should be able
to pass on packets with the lowest possible latency. I don't think it's
feasible to schedule a userspace router process for every packet that
comes in (they can currently do 435,000 packets per second on a P3-700),
so that would have to be done in bulk, and that's a killer for your latency.
AFAICS the right solution would be to do it in the kernel and not to use
C++ for it. It's a bit late for that now though. :)
-- Bart
next prev parent reply other threads:[~2004-01-21 17:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-16 21:09 Compiling C++ kernel module + Makefile Ashish sddf
2004-01-16 22:07 ` Richard B. Johnson
2004-01-17 12:59 ` Bart Samwel
2004-01-19 13:46 ` Richard B. Johnson
2004-01-19 17:40 ` Bart Samwel
2004-01-19 18:39 ` Richard B. Johnson
2004-01-19 20:02 ` Bart Samwel
2004-01-19 20:37 ` Richard B. Johnson
2004-01-19 21:24 ` Bart Samwel
2004-01-20 15:20 ` Richard B. Johnson
2004-01-20 17:34 ` Zan Lynx
2004-01-20 18:10 ` Richard B. Johnson
2004-01-20 13:38 ` Thomas Lahoda
2004-01-21 2:24 ` Michael Clark
2004-01-20 18:16 ` Chris Friesen
2004-01-21 17:01 ` Giuliano Pochini
2004-01-21 17:16 ` Bart Samwel [this message]
2004-01-20 0:59 ` Robin Rosenberg
2004-01-20 6:46 ` Linus Torvalds
2004-01-20 7:32 ` Robin Rosenberg
2004-01-20 10:46 ` Bart Samwel
2004-01-20 5:29 ` Valdis.Kletnieks
2004-01-20 9:48 ` Bart Samwel
2004-01-16 22:40 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2004-01-19 13:21 Petr Vandrovec
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=400EB3FA.80202@samwel.tk \
--to=bart@samwel.tk \
--cc=buff_boulder@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pochini@denise.shiny.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.