public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Larry McVoy <lm@bitmover.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Chris Lattner <sabre@nondot.org>,
	Jamie Lokier <lk@tantalophile.demon.co.uk>,
	Alexander Viro <viro@math.psu.edu>,
	"Mohammad A. Haque" <mhaque@haque.net>,
	Ben Ford <ben@kalifornia.com>,
	linux-kernel@vger.kernel.org, orbit-list@gnome.org,
	korbit-cvs@lists.sourceforge.net
Subject: Re: [Korbit-cvs] Re: ANNOUNCE: Linux Kernel ORB: kORBit
Date: Thu, 14 Dec 2000 02:10:44 -0800	[thread overview]
Message-ID: <20001214021044.C6380@work.bitmover.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0012132025310.24483-100000@www.nondot.org> <E146VE3-00043s-00@the-village.bc.nu>
In-Reply-To: <E146VE3-00043s-00@the-village.bc.nu>

[Alan DID not say this:]
> > There is a large perception of CORBA being slow, but for the most part it
> > is unjustified.  

Really?  I have that same perception but I can't claim that I've measured it.
On the other hand, I have measured the overhead of straight UDP, TCP, and
Sun RPC ping/pong tests and you can find the code for that in any version
of lmbench.  It should be a 5 minute task for someone who groks corba to
do the same thing using the same framework.  If someone wants to do it,
I'll guide them through the lmbench stuff.  It's pretty trivial, start 
with this as a guide:
/*
 * tcp_xact.c - simple TCP transaction latency test
 *
 * Three programs in one -
 *	server usage:	tcp_xact -s
 *	client usage:	tcp_xact hostname
 *	shutdown:	tcp_xact -hostname
 *
 * Copyright (c) 1994 Larry McVoy.  Distributed under the FSF GPL with
 * additional restriction that results may published only if
 * (1) the benchmark is unmodified, and
 * (2) the version in the sccsid below is included in the report.
 * Support for this development by Sun Microsystems is gratefully acknowledged.
 */
char	*id = "$Id$\n";

#include "bench.h"

void	client_main(int ac, char **av);
void	doserver(int sock);
void	doclient(int sock);
void	server_main(int ac, char **av);
void	doserver(int sock);

int
main(int ac, char **av)
{
	if (ac != 2) {
		fprintf(stderr, "Usage: %s -s OR %s [-]serverhost\n",
		    av[0], av[0]);
		exit(1);
	}
	if (!strcmp(av[1], "-s")) {
		if (fork() == 0) {
			server_main(ac, av);
		}
		exit(0);
	} else {
		client_main(ac, av);
	}
	return(0);
}

void
client_main(int ac, char **av)
{
	int     sock;
	char	*server;
	char	buf[100];

	if (ac != 2) {
		fprintf(stderr, "usage: %s host\n", av[0]);
		exit(1);
	}
	server = av[1][0] == '-' ? &av[1][1] : av[1];
	sock = tcp_connect(server, TCP_XACT, SOCKOPT_NONE);

	/*
	 * Stop server code.
	 */
	if (av[1][0] == '-') {
		close(sock);
		exit(0);
	}

	BENCH(doclient(sock), MEDIUM);
	sprintf(buf, "TCP latency using %s", av[1]);
	micro(buf, get_n());
	exit(0);
	/* NOTREACHED */
}

void
doclient(int sock)
{
	char    c;

	write(sock, &c, 1);
	read(sock, &c, 1);
}

void
child()
{
	wait(0);
	signal(SIGCHLD, child);
}

void
server_main(int ac, char **av)
{
	int     newsock, sock;

	if (ac != 2) {
		fprintf(stderr, "usage: %s -s\n", av[0]);
		exit(1);
	}
	GO_AWAY;
	signal(SIGCHLD, child);
	sock = tcp_server(TCP_XACT, SOCKOPT_NONE);
	for (;;) {
		newsock = tcp_accept(sock, SOCKOPT_NONE);
		switch (fork()) {
		    case -1:
			perror("fork");
			break;
		    case 0:
			doserver(newsock);
			exit(0);
		    default:
			close(newsock);
			break;
		}
	}
	/* NOTREACHED */
}

void
doserver(int sock)
{
	char    c;
	int	n = 0;

	while (read(sock, &c, 1) == 1) {
		write(sock, &c, 1);
		n++;
	}

	/*
	 * A connection with no data means shut down.
	 */
	if (n == 0) {
		tcp_done(TCP_XACT);
		kill(getppid(), SIGTERM);
		exit(0);
	}
}
-- 
---
Larry McVoy            	 lm at bitmover.com           http://www.bitmover.com/lm 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-14 10:42 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08 23:10 ANNOUNCE: Linux Kernel ORB: kORBit Chris Lattner
2000-12-09  4:45 ` Ben Ford
2000-12-09  5:00   ` Mohammad A. Haque
2000-12-09  5:39     ` Alexander Viro
2000-12-09 10:34       ` Jamie Lokier
2000-12-14  0:21         ` Chris Lattner
2000-12-14  1:11           ` Alan Cox
2000-12-14  1:48             ` Alexander Viro
2000-12-14  2:53               ` Michael Rothwell
2000-12-14  3:12               ` Chris Lattner
2000-12-14  3:36                 ` Michael Rothwell
2000-12-14 11:46                 ` Michael Livshin
2000-12-14 17:30                   ` Elliot Lee
2000-12-14  4:23               ` Chip Salzenberg
2000-12-14  4:28                 ` Alexander Viro
2000-12-14  4:42                   ` Chip Salzenberg
2000-12-14  4:47                     ` Alexander Viro
2000-12-14  4:52                       ` Chip Salzenberg
2000-12-14  5:15                         ` Alexander Viro
2000-12-14  9:23                           ` Oystein Viggen
2000-12-14  5:22                         ` David Feuer
2000-12-14  8:04                 ` josef höök
2000-12-14  8:09                   ` Alexander Viro
2000-12-14 13:53                     ` josef höök
2000-12-14  2:42             ` [Korbit-cvs] " Chris Lattner
2000-12-14  3:08               ` Alexander Viro
2000-12-14  3:19                 ` Chris Lattner
2000-12-14  3:42                   ` Alexander Viro
2000-12-14  3:52                     ` Chris Lattner
2000-12-14  4:24                       ` Alexander Viro
2000-12-14  4:41                         ` CORBA vs 9P Chris Lattner
2000-12-14  4:57                           ` Alexander Viro
2000-12-14  5:04                             ` Chris Lattner
2000-12-14 10:02               ` [Korbit-cvs] Re: ANNOUNCE: Linux Kernel ORB: kORBit Alan Cox
2000-12-14 10:10                 ` Larry McVoy [this message]
2000-12-14 17:38                   ` Chris Lattner
2000-12-14 17:33                 ` Chris Lattner
2000-12-14  2:06           ` Alexander Viro
2000-12-14  2:53             ` Chris Lattner
2000-12-14  3:29               ` Alexander Viro
2000-12-14  3:42                 ` Chris Lattner
2000-12-14  4:05                   ` Alexander Viro
2000-12-14  4:14                     ` Chris Lattner
2000-12-14  4:45                       ` Alexander Viro
2000-12-14  5:00                         ` Chris Lattner
2000-12-14  5:56                           ` Alexander Viro
2000-12-14  6:23                             ` [Korbit-cvs] " Chris Lattner
2000-12-14  7:23                               ` Alexander Viro
2000-12-14 18:03                                 ` Chris Lattner
2000-12-14 19:11                                   ` Alexander Viro
2000-12-14 22:10                                     ` [Korbit-cvs] Re: ANNOUNCE: Linux Kernel ORB: kORBit (and ioctl must die!) Mike Coleman
2000-12-14  9:23                   ` ANNOUNCE: Linux Kernel ORB: kORBit josef höök
2000-12-14  9:30                     ` Larry McVoy
2000-12-14 20:02               ` Pavel Machek
2000-12-15 10:25                 ` josef höök
2000-12-15 15:54                 ` Chris Lattner
2000-12-15 20:10                 ` Mikulas Patocka
2000-12-15 20:26                   ` Pavel Machek
2000-12-15 20:37                     ` Mikulas Patocka
2000-12-15 22:19                   ` Alan Cox
2000-12-16  0:19                     ` Mikulas Patocka
2000-12-18 20:29                       ` Rik van Riel
2000-12-18 20:42                         ` Andrea Arcangeli
2000-12-18 20:48                           ` Rik van Riel
2000-12-18 21:57                             ` Mikulas Patocka
2000-12-19  0:27                               ` Andrea Arcangeli
2000-12-19  8:42                                 ` Mikulas Patocka
2000-12-19  9:30                                   ` Andrea Arcangeli
2000-12-18 21:46                         ` Mikulas Patocka
2000-12-18 22:02                           ` Alan Cox
2000-12-18 22:13                             ` Mikulas Patocka
2000-12-18  8:27                   ` David Ford
2000-12-14 16:34             ` Jamie Lokier
2000-12-14 16:45           ` Rik van Riel
2000-12-14 16:49             ` Chris Lattner
2000-12-14 17:23             ` [Korbit-cvs] " Fredrik Vraalsen
2000-12-14 17:34               ` Jamie Lokier
2000-12-17 23:42               ` Pavel Machek
2000-12-18 20:39                 ` Chris Lattner
2000-12-09 11:59       ` Alan Cox
2000-12-09 12:29         ` Alexander Viro
2000-12-09 15:50           ` Dietmar Kling
2000-12-09 20:59             ` Alan Cox
2000-12-10  2:18               ` Alexander Viro
2000-12-10  2:58                 ` Dietmar Kling
2000-12-10  3:22                   ` David Ford
2000-12-11 13:38                   ` Martin Dalecki
2000-12-11 13:47                     ` J . A . Magallon
2000-12-11 17:48                       ` ANNOUNCE: Linux Kernel ORB: kORBit ( getting off topic) Matthew D. Pitts
2000-12-11 17:18                     ` ANNOUNCE: Linux Kernel ORB: kORBit Alexander Viro
2000-12-11 17:50                       ` Dietmar Kling
2000-12-11 18:53                         ` Alexander Viro
2000-12-11 19:00                           ` Dietmar Kling
2000-12-11 20:21                             ` Alexander Viro
2000-12-09 14:16       ` Alexander Viro
2000-12-12 23:26     ` Chris Lattner
2000-12-13  9:42       ` David Woodhouse
2000-12-14 19:42       ` Pavel Machek
2000-12-09  5:51   ` David Ford
2000-12-10 22:33   ` Pavel Machek
2000-12-11 22:42   ` Michael Rothwell
2000-12-12 15:05     ` josef höök
2000-12-12 15:18       ` Michael Rothwell
     [not found] <E146VJz-00044N-00@the-village.bc.nu>
2000-12-14 17:37 ` [Korbit-cvs] " Chris Lattner
2000-12-14 18:34   ` Alan Cox

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=20001214021044.C6380@work.bitmover.com \
    --to=lm@bitmover.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ben@kalifornia.com \
    --cc=korbit-cvs@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@tantalophile.demon.co.uk \
    --cc=mhaque@haque.net \
    --cc=orbit-list@gnome.org \
    --cc=sabre@nondot.org \
    --cc=viro@math.psu.edu \
    /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