From: david@lang.hm
To: Cyclonus J <cyclonusj@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>, linux-kernel@vger.kernel.org
Subject: Re: intercommunications between Linux kernel modules
Date: Thu, 6 Oct 2011 21:00:13 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.02.1110062056490.5597@asgard.lang.hm> (raw)
In-Reply-To: <CAOzbF4d+4cZNu_jTPuWcxves2QvidczcfzMzspMKYkGHi-mFxA@mail.gmail.com>
On Thu, 6 Oct 2011, Cyclonus J wrote:
> On Thu, Oct 6, 2011 at 7:04 PM, Andi Kleen <andi@firstfloor.org> wrote:
>> Cyclonus J <cyclonusj@gmail.com> writes:
>>
>>> I am looking for a way to do an IPC-like communications between two
>>> linux kernel modules, such as mqueue or shared memory. After searching
>>> for a while, I can't find such information available inside existing
>>> linux kernel or online.
>>>
>>> So, my question is if this is something discussed before here and gets
>>> rejected or still might be accepted in the mainstream kernel tree?
>>
>> All kernel memory is shared in Linux, so the concept doesn't make sense.
>>
>> If you want to send messages or communicate inside the kernel there are
>> lots of different facilities available.
>
> Andi,
>
> That would be great! Could you point me to some facilities that can do
> this message passing between kernels?
what you are missing is that there aren't two different kernels. it's one
big process. think multi-threaded programming instead of inter-process
communication. You don't even have well defined threads to work with so
you can't say "I'm in thread 1 and need to communicate with thread 2", you
need to think "I'm in this routine and I need to set a message in a way
that another routine will read it", this can be as simple as just setting
a variable (although you do need to make it the equivalent of 'thread
safe' through appropriate locking or lock-free protection)
David Lang
next prev parent reply other threads:[~2011-10-07 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 1:53 Cyclonus J
2011-10-07 2:04 ` Andi Kleen
2011-10-07 2:59 ` Cyclonus J
2011-10-07 4:00 ` david [this message]
2011-10-07 4:10 ` Cyclonus J
2011-10-07 17:41 ` Christoph Lameter
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=alpine.DEB.2.02.1110062056490.5597@asgard.lang.hm \
--to=david@lang.hm \
--cc=andi@firstfloor.org \
--cc=cyclonusj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®