From: "Luca Veraldi" <luca.veraldi@katamail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>, <linux-kernel@vger.kernel.org>
Subject: Re: Efficient IPC mechanism on Linux
Date: Tue, 9 Sep 2003 23:57:02 +0200 [thread overview]
Message-ID: <014201c3771d$4e95c160$36af7450@wssupremo> (raw)
In-Reply-To: <1063142262.30981.17.camel@dhcp23.swansea.linux.org.uk>
> The text is a little hard to follow for an English speaker. I can follow
> a fair bit and there are a few things I'd take issue with (forgive me if
> I'm misunderstanding your material)
I know. I'm very sorry for this. I'm rewriting the text in English,
so, don't bore with Italian. The new page will be up in a moment.
> 1. Almost all IPC is < 512 bytes long. There are exceptions including
> X11 image passing which is an important performance one
Sure for system needs. What about programming?
You can write application of any complexity.
Why do I have to be limited by kernel in sending 4056 bytes
(for exmple, if I use SYS V message queues)
instead of an arbitrary sized message?
> 2. One of the constraints that a message system has is that if it uses
> shared memory it must protect the memory queues from abuse. For example
> if previous/next pointers are kept in the shared memory one app may be
> able to trick another into modifying the wrong thing. Sometimes this
> matters.
Please, refer to address space.
If you don't have the piece of information you want to access
into your own private address space, the only thing that will occur
is a general protection fault and your process will be killed.
Remember that, with my primitives, you're working with logical addresses
that need relocation in hardware. The MMU contestually performs
memory protection, too.
> 3. An interesting question exists as to how whether you can create the
> same effect with current 2.6 kernel primitives. We have posix shared
> memory objects, we have read only mappings and we have extremely fast
> task switch and also locks (futex locks)
I too need to use locks in my primitives. The fact that new kernel has
faster locks also reduceses the completion time of my primitives.
Also. The central point is not to have10 instead of 50 assembler lines
in the primitives. The central point is to implement communication
primitives
that do not require physical copying of the messages being sent and
received.
Lock probably reduces the time to write or read from a pipe.
But the order of magnitute remains the same.
Task switching is relevant in all communication primitives.
Fast task switch means proportionally fast primitives. Also mine primitives.
> Also from the benching point of view it is always instructive to run a
> set of benchmarks that involve the sender writing all the data bytes,
> sending it and the receiver reading them all. Without this zero copy
> mechanisms (especially mmu based ones) look artificially good.
The bench you are talking about is exactly the one I implemented to misure
the IPC overhead.
We have 2 process communicating over a channel in a pipeline fashion.
A writes some information in a buffer and sends it to B.
B receives and reads.
This for 1000 times.
Times reported are average time.
Bye,
Luca
next prev parent reply other threads:[~2003-09-09 21:53 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-09 17:30 Luca Veraldi
2003-09-09 21:17 ` Alan Cox
2003-09-09 21:57 ` Luca Veraldi [this message]
2003-09-09 23:11 ` Alan Cox
2003-09-10 9:04 ` Luca Veraldi
2003-09-10 12:56 ` Alan Cox
[not found] ` <20030909175821.GL16080@Synopsys.COM>
[not found] ` <001d01c37703$8edc10e0$36af7450@wssupremo>
[not found] ` <20030910064508.GA25795@Synopsys.COM>
2003-09-10 9:18 ` Luca Veraldi
2003-09-10 9:23 ` Arjan van de Ven
2003-09-10 9:40 ` Luca Veraldi
2003-09-10 9:44 ` Arjan van de Ven
2003-09-10 10:09 ` Luca Veraldi
2003-09-10 10:14 ` Arjan van de Ven
2003-09-10 10:25 ` Luca Veraldi
2003-09-12 18:41 ` Timothy Miller
2003-09-12 19:05 ` Luca Veraldi
2003-09-12 22:37 ` Alan Cox
2003-09-10 12:50 ` Alan Cox
2003-09-10 19:16 ` Shawn
2003-09-10 20:05 ` Rik van Riel
2003-09-17 9:52 ` Rik's list of CS challenges Terje Eggestad
2003-09-17 13:40 ` Alan Cox
2003-09-18 8:26 ` Helge Hafting
2003-09-10 12:47 ` Efficient IPC mechanism on Linux Alan Cox
2003-09-10 13:56 ` Luca Veraldi
2003-09-10 15:59 ` Alan Cox
2003-09-10 9:52 ` Jamie Lokier
2003-09-10 10:07 ` Arjan van de Ven
2003-09-10 10:17 ` Luca Veraldi
2003-09-10 10:37 ` Jamie Lokier
2003-09-10 10:41 ` Arjan van de Ven
2003-09-10 10:54 ` Luca Veraldi
2003-09-10 10:54 ` Arjan van de Ven
2003-09-10 11:16 ` Nick Piggin
2003-09-10 11:30 ` Luca Veraldi
2003-09-10 11:44 ` Nick Piggin
2003-09-10 12:14 ` Luca Veraldi
2003-09-10 12:42 ` Alan Cox
2003-09-10 10:11 ` Luca Veraldi
2003-09-10 19:24 ` Pavel Machek
2003-09-10 19:40 ` Jamie Lokier
2003-09-10 21:35 ` Pavel Machek
2003-09-10 22:06 ` Jamie Lokier
2003-09-10 11:52 ` Alex Riesen
2003-09-10 12:14 ` Luca Veraldi
2003-09-10 12:11 ` Alex Riesen
2003-09-10 12:29 ` Luca Veraldi
2003-09-10 12:28 ` Alex Riesen
2003-09-10 12:36 ` Luca Veraldi
2003-09-10 12:36 ` Alex Riesen
2003-09-10 13:33 ` Gábor Lénárt
2003-09-10 14:04 ` Luca Veraldi
2003-09-10 14:21 ` Stewart Smith
2003-09-10 14:39 ` Luca Veraldi
2003-09-10 16:59 ` Andrea Arcangeli
2003-09-10 17:05 ` Andrea Arcangeli
2003-09-10 17:21 ` Luca Veraldi
2003-09-10 17:41 ` Andrea Arcangeli
2003-09-10 17:39 ` Martin Konold
2003-09-10 18:01 ` Andrea Arcangeli
2003-09-10 18:05 ` Martin Konold
2003-09-10 18:31 ` Chris Friesen
2003-09-10 18:08 ` Inappropriate signatures Larry McVoy
2003-09-10 18:52 ` Jamie Lokier
2003-09-10 19:54 ` rsync head? [was inappropriate signatures] Joe Perches
2003-09-13 15:39 ` Inappropriate signatures Pavel Machek
2003-09-13 16:49 ` Larry McVoy
2003-09-09 18:59 Efficient IPC mechanism on Linux Luca Veraldi
2003-09-09 22:15 Luca Veraldi
[not found] <F71B37536F3B3D4FA521FEC7FCA17933164A@twinsrv.twinox.se>
2003-09-10 10:36 ` Luca Veraldi
[not found] <E19x3el-0002Fc-Rj@phoenix.hadiko.de>
2003-09-10 12:16 ` Luca Veraldi
2003-09-10 14:53 ` Larry McVoy
[not found] <fa.h06p421.1s00ojt@ifi.uio.no>
[not found] ` <fa.gc37hsp.34id89@ifi.uio.no>
[not found] ` <E19x47V-0002JG-J8@phoenix.hadiko.de>
2003-09-10 12:45 ` Luca Veraldi
[not found] <u9j3.1VB.27@gated-at.bofh.it>
[not found] ` <u9j3.1VB.29@gated-at.bofh.it>
[not found] ` <u9j3.1VB.31@gated-at.bofh.it>
[not found] ` <u9j3.1VB.25@gated-at.bofh.it>
[not found] ` <ubNY.5Ma.19@gated-at.bofh.it>
[not found] ` <uc79.6lg.13@gated-at.bofh.it>
[not found] ` <uc7d.6lg.23@gated-at.bofh.it>
[not found] ` <uch0.6zx.17@gated-at.bofh.it>
[not found] ` <ucqs.6NC.3@gated-at.bofh.it>
[not found] ` <ucqy.6NC.19@gated-at.bofh.it>
[not found] ` <udmB.8eZ.15@gated-at.bofh.it>
[not found] ` <udPF.BD.11@gated-at.bofh.it>
[not found] ` <3F5F37CD.6060808@softhome.net>
2003-09-10 15:28 ` Luca Veraldi
2003-09-10 18:41 Manfred Spraul
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='014201c3771d$4e95c160$36af7450@wssupremo' \
--to=luca.veraldi@katamail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--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
Powered by JetHome