From owner-kaio@oss.sgi.com Thu Nov 9 12:32:10 2000 Received: by oss.sgi.com id ; Thu, 9 Nov 2000 12:32:00 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:42759 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Thu, 9 Nov 2000 12:31:46 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id PAA03933 for ; Thu, 9 Nov 2000 15:31:41 -0600 Message-ID: <3A0B17BD.D02DC733@lincom-asg.com> Date: Thu, 09 Nov 2000 15:31:41 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: examples Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Hello there, I'd really like to see some code that uses the kaio library. BTW, would kaio be overkill for high speed serial ports? Thanks, Jeff From owner-kaio@oss.sgi.com Thu Nov 9 19:14:32 2000 Received: by oss.sgi.com id ; Thu, 9 Nov 2000 19:14:22 -0800 Received: from gate.webfountain.com ([63.161.54.3]:63035 "EHLO geneva.intranet") by oss.sgi.com with ESMTP id ; Thu, 9 Nov 2000 19:14:13 -0800 Received: from digitalfountain.com (jjpersch@localhost [127.0.0.1]) (authenticated (0 bits)) by geneva.intranet (8.11.1/8.11.1/Debian 8.11.0-6) with ESMTP id eAA3E8s02151; Thu, 9 Nov 2000 19:14:08 -0800 X-Authentication-Warning: geneva.intranet: Host jjpersch@localhost [127.0.0.1] claimed to be digitalfountain.com Message-ID: <3A0B6800.F844FB9B@digitalfountain.com> Date: Thu, 09 Nov 2000 19:14:08 -0800 From: "Jeffrey J. Persch" X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: linux 2.4.0-test9 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Are kaio patches available for the 2.4.0-test* kernels? I am attempting to use the kaio-kern-1.2-2.3.49 patch against a 2.4.0-test9 kernel (by manually relocating the syscall) without much success. Thanks in advance, -- Jeffrey J. Persch office 415.401.2119 Digital Fountain, Inc. cellular 415.720.0198 From owner-kaio@oss.sgi.com Fri Nov 10 09:34:38 2000 Received: by oss.sgi.com id ; Fri, 10 Nov 2000 09:34:28 -0800 Received: from fep03.swip.net ([130.244.199.131]:47555 "EHLO fep03-svc.swip.net") by oss.sgi.com with ESMTP id ; Fri, 10 Nov 2000 09:34:17 -0800 Received: from henrik.localdomain ([212.151.163.43]) by fep03-svc.swip.net (InterMail vM.5.01.01.01 201-252-104) with ESMTP id <20001110173409.OHX9233.fep03-svc.swip.net@henrik.localdomain>; Fri, 10 Nov 2000 18:34:09 +0100 Received: from henrik.localdomain (IDENT:henrik@localhost [127.0.0.1]) by henrik.localdomain (8.9.3/8.9.3) with SMTP id SAA05355; Fri, 10 Nov 2000 18:00:09 +0100 Message-ID: <3A0C2999.5E6873E6@hem.passagen.se> Date: Fri, 10 Nov 2000 18:00:09 +0100 From: Henrik Nordstrom X-Mailer: Mozilla 3.01 (X11; I; Linux 2.2.14-5.0 i586) MIME-Version: 1.0 To: "Jeffrey J. Persch" CC: kaio@oss.sgi.com Subject: Re: linux 2.4.0-test9 References: <3A0B6800.F844FB9B@digitalfountain.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing The KAIO patches apply with only some small amount of manual work last time I tried, but be warned that patch sometimes misplaces "fuzzy" lines. Another alternative is to try a reiserfs-raw kernel which includes KAIO. See the "SquidNG" link on http://squid.sourceforge.net/. Note: The modified user-side library code in in the SquidNG squid sources under src/fs/butterfly/, but the original library should be compatible as well. Howerer, the KAIO kernel and user-level code contains some small bugfixes compared to the original code, plus a number of additions (of which some are quite specific to the project). -- Henrik Nordstrom Squid hacker Jeffrey J. Persch wrote: > > Are kaio patches available for the 2.4.0-test* kernels? > > I am attempting to use the kaio-kern-1.2-2.3.49 patch against a 2.4.0-test9 > kernel (by manually relocating the syscall) without much success. > > Thanks in advance, > -- > Jeffrey J. Persch office 415.401.2119 > Digital Fountain, Inc. cellular 415.720.0198 From owner-kaio@oss.sgi.com Fri Nov 10 11:20:38 2000 Received: by oss.sgi.com id ; Fri, 10 Nov 2000 11:20:28 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:32635 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 10 Nov 2000 11:20:11 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id LAA03784 for ; Fri, 10 Nov 2000 11:12:20 -0800 (PST) mail_from (ananth@sgi.com) Received: from sgi.com (mango.engr.sgi.com [163.154.5.76]) by madurai.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id LAA22150; Fri, 10 Nov 2000 11:14:33 -0800 (PST) Message-ID: <3A0C4A40.FA05B323@sgi.com> Date: Fri, 10 Nov 2000 11:19:28 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-4SGI_20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Henrik Nordstrom CC: "Jeffrey J. Persch" , kaio@oss.sgi.com Subject: Re: linux 2.4.0-test9 References: <3A0B6800.F844FB9B@digitalfountain.com> <3A0C2999.5E6873E6@hem.passagen.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Henrik Nordstrom wrote: > > The KAIO patches apply with only some small amount of manual work last > time I tried, but be warned that patch sometimes misplaces "fuzzy" > lines. > > Another alternative is to try a reiserfs-raw kernel which includes KAIO. > See the "SquidNG" link on http://squid.sourceforge.net/. Note: The > modified user-side library code in in the SquidNG squid sources under > src/fs/butterfly/, but the original library should be compatible as > well. Howerer, the KAIO kernel and user-level code contains some small > bugfixes compared to the original code, plus a number of additions (of > which some are quite specific to the project). > I'll take a look at the 2.3.49 patches and generate new ones for 2.4.0-test10. Henrik, do you know if the squidNG (with kaio) is used in real world situations or is it mostly an experimental prototype? Just curious ... thanks, -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. -------------------------------------------------------------------------- From owner-kaio@oss.sgi.com Fri Nov 10 12:00:48 2000 Received: by oss.sgi.com id ; Fri, 10 Nov 2000 12:00:28 -0800 Received: from fep02.swip.net ([130.244.199.130]:15596 "EHLO convert rfc822-to-8bit fep02-svc.swip.net") by oss.sgi.com with ESMTP id ; Fri, 10 Nov 2000 12:00:07 -0800 Received: from henrik.localdomain ([212.151.226.13]) by fep02-svc.swip.net (InterMail vM.5.01.01.01 201-252-104) with ESMTP id <20001110195956.YAT23826.fep02-svc.swip.net@henrik.localdomain>; Fri, 10 Nov 2000 20:59:56 +0100 Received: from henrik.localdomain (IDENT:henrik@localhost [127.0.0.1]) by henrik.localdomain (8.9.3/8.9.3) with SMTP id UAA07309; Fri, 10 Nov 2000 20:46:40 +0100 Message-ID: <3A0C50A0.720A109D@hem.passagen.se> Date: Fri, 10 Nov 2000 20:46:40 +0100 From: Henrik Nordstrom X-Mailer: Mozilla 3.01 (X11; I; Linux 2.2.14-5.0 i586) MIME-Version: 1.0 To: Rajagopal Ananthanarayanan CC: kaio@oss.sgi.com Subject: Re: SquidNG References: <3A0B6800.F844FB9B@digitalfountain.com> <3A0C2999.5E6873E6@hem.passagen.se> <3A0C4A40.FA05B323@sgi.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Rajagopal Ananthanarayanan wrote: > Henrik, do you know if the squidNG (with kaio) is > used in real world situations or is it mostly > an experimental prototype? Just curious ... It was used by SwellTech in their entry on the latest proxy server bakeoff. SwellTech: http://www.swelltech.com/ Bakeoff: http://www.measurement-factory.com/ but it is still experimental and not yet available for sale, but it certainly is a lot more than a prototype. -- Henrik Nordström Squid hacker From owner-kaio@oss.sgi.com Fri Nov 10 15:56:29 2000 Received: by oss.sgi.com id ; Fri, 10 Nov 2000 15:56:09 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:45673 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 10 Nov 2000 15:55:47 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id PAA26330 for ; Fri, 10 Nov 2000 15:47:55 -0800 (PST) mail_from (ananth@sgi.com) Received: from sgi.com (mango.engr.sgi.com [163.154.5.76]) by madurai.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id PAA21191; Fri, 10 Nov 2000 15:49:04 -0800 (PST) Message-ID: <3A0C8A96.B4C6CD2A@sgi.com> Date: Fri, 10 Nov 2000 15:53:58 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-4SGI_20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: "Jeffrey J. Persch" CC: kaio@oss.sgi.com Subject: KAIO for 2.4.0-test10 available References: <3A0B6800.F844FB9B@digitalfountain.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing "Jeffrey J. Persch" wrote: > > Are kaio patches available for the 2.4.0-test* kernels? > > I am attempting to use the kaio-kern-1.2-2.3.49 patch against a 2.4.0-test9 > kernel (by manually relocating the syscall) without much success. > I've now uploaded Version 1.3 of KAIO for linux version 2.4.0-test10. Please checkout the news & download sections at http://oss.sgi.com/projects/kaio -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. -------------------------------------------------------------------------- From owner-kaio@oss.sgi.com Thu Nov 16 06:44:44 2000 Received: by oss.sgi.com id ; Thu, 16 Nov 2000 06:44:34 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:19729 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Thu, 16 Nov 2000 06:44:13 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id IAA25152 for ; Thu, 16 Nov 2000 08:44:08 -0600 Message-ID: <3A13F2B8.8A7F2F6F@lincom-asg.com> Date: Thu, 16 Nov 2000 08:44:08 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: patches for 2.2.17? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Hello, Can someone post the patches against 2.2.17? Thanks, Jeff From owner-kaio@oss.sgi.com Thu Nov 16 08:31:56 2000 Received: by oss.sgi.com id ; Thu, 16 Nov 2000 08:31:36 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:38208 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 16 Nov 2000 08:31:16 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id IAA20803 for ; Thu, 16 Nov 2000 08:23:24 -0800 (PST) mail_from (ananth@sgi.com) Received: from sgi.com (sgigate.sgi.com [198.29.75.75]) by madurai.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id IAA28844; Thu, 16 Nov 2000 08:25:41 -0800 (PST) Message-ID: <3A140B52.6545BA23@sgi.com> Date: Thu, 16 Nov 2000 08:29:06 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_17 i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeff Graham CC: kaio@oss.sgi.com Subject: Re: patches for 2.2.17? References: <3A13F2B8.8A7F2F6F@lincom-asg.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Jeff Graham wrote: > > Hello, > > Can someone post the patches against 2.2.17? > The 2.2 patches in the download section should be applicable to 2.2.17 ... Haven't tried it myself, but this should work. Can you please let me know if you're having problems with that? thanks, -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. -------------------------------------------------------------------------- From owner-kaio@oss.sgi.com Thu Nov 16 17:32:58 2000 Received: by oss.sgi.com id ; Thu, 16 Nov 2000 17:32:48 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:41509 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 16 Nov 2000 17:32:26 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id RAA06818 for ; Thu, 16 Nov 2000 17:24:34 -0800 (PST) mail_from (ananth@sgi.com) Received: from sgi.com (mango.engr.sgi.com [163.154.5.76]) by madurai.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id RAA28992; Thu, 16 Nov 2000 17:25:43 -0800 (PST) Message-ID: <3A1489E0.80DBC4A3@sgi.com> Date: Thu, 16 Nov 2000 17:29:04 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-4SGI_20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeff Graham CC: kaio@oss.sgi.com Subject: Re: patches for 2.2.17? References: <3A13F2B8.8A7F2F6F@lincom-asg.com> <3A140B52.6545BA23@sgi.com> <3A144187.25480858@lincom-asg.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Thanks to Jeff who tried the 2.2.17 patches and found some problems applying it. I've now respun the diffs specifically for 2.2.17 kernel. Please checkout the download: http://oss.sgi.com/projects/kaio/download Let me know if you're still having problems. regards, -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. -------------------------------------------------------------------------- From owner-kaio@oss.sgi.com Fri Nov 17 09:05:54 2000 Received: by oss.sgi.com id ; Fri, 17 Nov 2000 09:05:44 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:10244 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Fri, 17 Nov 2000 09:05:26 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id LAA01473 for ; Fri, 17 Nov 2000 11:05:20 -0600 Message-ID: <3A156550.690D5932@lincom-asg.com> Date: Fri, 17 Nov 2000 11:05:20 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16pre4 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: kernel panic booting 2.2.17 after patching Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Everyone, After applying the kaio patches, my machine no longer boots... it has the Adaptec AIC 7890/1 ultra scsi2 host adaptor. Looks like the kaio-kernel patch touches the /usr/src/linux/drivers/scsi/sd.c file (the linux scsi driver) in several places. The panic comes after successfully installing the ethernet driver... the info is: VFS: Cannot open root device 08:03 Kernel Panic: VFS: Unable to mount root fs on 08:03 Appears to be a scsi problem... Anyone out there know what the problem is? Thanks, Jeff From owner-kaio@oss.sgi.com Tue Nov 21 13:05:13 2000 Received: by oss.sgi.com id ; Tue, 21 Nov 2000 13:05:03 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:6405 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Tue, 21 Nov 2000 13:04:45 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id PAA14765 for ; Tue, 21 Nov 2000 15:04:28 -0600 Message-ID: <3A1AE35C.CEB5CE9E@lincom-asg.com> Date: Tue, 21 Nov 2000 15:04:28 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: a test program for serial or sockets? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Everyone, I finally got kaio installed. Noticed that the Makefile for the library does not make a static lib. So I added one. Also, if you are using C++, don't forget to do the special extern "C" { #include } to help the linker demangle the c calls. I built a test program ( morphed one from the ACE library) and it is working. It does file i/o though. Does anyone have a test for sockets or serial ports? Thanks, Jeff From owner-kaio@oss.sgi.com Tue Nov 21 13:33:13 2000 Received: by oss.sgi.com id ; Tue, 21 Nov 2000 13:32:54 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:57173 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 21 Nov 2000 13:32:33 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id NAA08096 for ; Tue, 21 Nov 2000 13:24:40 -0800 (PST) mail_from (ananth@sgi.com) Received: from sgi.com (mango.engr.sgi.com [163.154.5.76]) by madurai.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id NAA32207; Tue, 21 Nov 2000 13:27:04 -0800 (PST) Message-ID: <3A1AE96A.145C755F@sgi.com> Date: Tue, 21 Nov 2000 13:30:18 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.16-4SGI_20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeff Graham CC: kaio@oss.sgi.com Subject: Re: a test program for serial or sockets? References: <3A1AE35C.CEB5CE9E@lincom-asg.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Jeff Graham wrote: > Noticed that the Makefile for the library does not make a static lib. > So I added one. > > Also, if you are using C++, don't forget to do the special > extern "C" > { > #include > } > > to help the linker demangle the c calls. I'll add this information to the FAQ and/or readme file. > > I built a test program ( morphed one from the ACE library) and it is working. It > does file i/o though. > > Does anyone have a test for sockets or serial ports? There was a program that used sockets from Christopher Smith. Have a look at the mail archives: http://oss.sgi.com/projects/kaio/archive/kaio.9912 I think the program was used to simulate a http server, IIRC. May be Chris can expand on it? regards, -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. -------------------------------------------------------------------------- From owner-kaio@oss.sgi.com Tue Nov 21 13:37:33 2000 Received: by oss.sgi.com id ; Tue, 21 Nov 2000 13:37:23 -0800 Received: from cy57850-a.rdondo1.ca.home.com ([24.5.132.106]:50702 "HELO firewall.philstone.com") by oss.sgi.com with SMTP id ; Tue, 21 Nov 2000 13:37:17 -0800 Received: from [192.168.1.11] (unknown [192.168.1.11]) by firewall.philstone.com (Postfix) with ESMTP id 001E88C3F; Tue, 21 Nov 2000 13:37:15 -0800 (PST) Date: Tue, 21 Nov 2000 13:36:45 -0800 From: Christopher Smith To: kaio@oss.sgi.com Cc: Jeff Graham Subject: Re: a test program for serial or sockets? Message-ID: <4151196262.974813805@[192.168.1.11]> In-Reply-To: <3A1AE96A.145C755F@sgi.com> X-Mailer: Mulberry/2.0.5 (Win32 Demo) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing --On Tuesday, November 21, 2000 1:30 PM -0800 Rajagopal Ananthanarayanan wrote: > I think the program was used to simulate a http server, IIRC. > May be Chris can expand on it? Yup. It was a VERY primitive simulation of an HTTP server. You started up the software, and then connected using Netscape to the appropriate port. It sent back a very simple HTTP 1.0 response. It doesn't do anything to demonstrate KAIO's performance benefits, but it did prove to be a could tool for testing the API's, as it found a bug prevents sockets from working properly. ;-) I think I have my own copy of it somewhere around here.... I'll see if I can post it again tomorrow if people are having problems finding it. --Chris From owner-kaio@oss.sgi.com Tue Nov 21 15:23:33 2000 Received: by oss.sgi.com id ; Tue, 21 Nov 2000 15:23:23 -0800 Received: from cy57850-a.rdondo1.ca.home.com ([24.5.132.106]:53774 "HELO firewall.philstone.com") by oss.sgi.com with SMTP id ; Tue, 21 Nov 2000 15:23:06 -0800 Received: from hellman (unknown [192.168.1.12]) by firewall.philstone.com (Postfix) with ESMTP id 4B29F8C3F; Tue, 21 Nov 2000 15:23:05 -0800 (PST) Date: Tue, 21 Nov 2000 15:22:34 -0800 From: Christopher Smith To: kaio@oss.sgi.com Cc: Jeff Graham Subject: Re: a test program for serial or sockets? Message-ID: <4620000.974848954@hellman> In-Reply-To: <4151196262.974813805@[192.168.1.11]> X-Mailer: Mulberry/2.0.6a8 (Linux/x86 Demo) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing --On Tuesday, November 21, 2000 01:36:45 PM -0800 Christopher Smith wrote: > demonstrate KAIO's performance benefits, but it did prove to be a could ^^^^^ I meant "good". No idea what my fingers were thinking. ;-) --Chris From owner-kaio@oss.sgi.com Wed Nov 29 10:28:53 2000 Received: by oss.sgi.com id ; Wed, 29 Nov 2000 10:28:33 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:35847 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Wed, 29 Nov 2000 10:28:25 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id MAA17411 for ; Wed, 29 Nov 2000 12:28:06 -0600 Message-ID: <3A254AB6.B88D6358@lincom-asg.com> Date: Wed, 29 Nov 2000 12:28:06 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: what's wrong with this code? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Everyone, I wrote a little program to test sockets with. No matter what I try, I always get: ./testSocket_aio listening aio_read() failed with rc=-1 and errno=11 aio_read: Resource temporarily unavailable aio_write() failed with rc=-1 and errno=11 aio_write failed: Resource temporarily unavailable Segmentation fault Can anyone tell me what I am doing wrong here? Thanks, Jeff ------------------- code begins here ------------------------------ extern "C" { #include } #include #include #include #include #include #include #include #include #include #include #include static const int PORT=5809; static const char* SERVERHOST="localhost"; static const unsigned int SLEEP_USECS=1; static const size_t MAXMSG=512; static int Test_Result=EXIT_SUCCESS; void init_sockaddr (struct sockaddr_in *name, const char *hostname, unsigned short int port) { struct hostent *hostinfo; name->sin_family = AF_INET; name->sin_port = htons (port); hostinfo = gethostbyname (hostname); if (NULL == hostinfo ) { fprintf (stderr, "Unknown host %s.\n", hostname); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } name->sin_addr = *(struct in_addr *) hostinfo->h_addr; } int make_socket (unsigned short int port) { int sock; struct sockaddr_in name; /* Create the socket. */ sock = socket (PF_INET, SOCK_STREAM, 0); if (sock < 0) { perror ("socket"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } /* Give the socket a name. */ name.sin_family = AF_INET; name.sin_port = htons (port); name.sin_addr.s_addr = htonl (INADDR_ANY); if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) { perror ("bind"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } return sock; } void write_to_server (int filedes) { static int writeCount=0; static char msg[MAXMSG]; /* set up aio stuff */ struct aiocb aiocb_write; aiocb_write.aio_fildes = filedes; aiocb_write.aio_offset = 0; aiocb_write.aio_buf = msg; aiocb_write.aio_reqprio = 0; aiocb_write.aio_sigevent.sigev_notify = SIGEV_NONE; aiocb_write.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb_write; int rc(0),rc1(0),rc2(0); struct aiocb* list_aiocb[1]; int write_inprogress(0); for (writeCount=0; writeCount <= 100; writeCount++) { usleep(SLEEP_USECS); if ( 100 == writeCount ) sprintf(msg,"QUIT"); else sprintf(msg,"%3d: Hello from client",writeCount); aiocb_write.aio_nbytes = strlen(msg)+1; // now write it using aio rc = aio_write(&aiocb_write); if ( 0 != rc ) { fprintf(stderr,"aio_write() failed with rc=%d and errno=%d\n",rc,errno); perror("aio_write failed"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } // suspend until the write is finished list_aiocb[0] = &aiocb_write; write_inprogress=1; rc = aio_suspend(list_aiocb,1,NULL); if ( -1 == rc ) { perror("aio_suspend"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } if ( 0 != rc ) { perror("unknown aio_suspend error"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } // an async i/o event occurred, since we dropped out of the aio_suspend() without error while ( 1 == write_inprogress ) { rc1 = aio_error(list_aiocb[0]); if ( EINPROGRESS == rc1 ) { // write still in progress } else { rc2 = aio_return(list_aiocb[0]); if ( -1 == rc2 ) { perror("aio_return for write"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } if ( ( 0 == rc1 ) || ( 0 == rc2 ) ) { // write finished successfully fprintf (stderr, "Client: tx message: `%s'\n", msg); write_inprogress=0; list_aiocb[0] = NULL; } else { perror("unknown error in aio_return for write"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } } } } } int runClient(void) { int sock; struct sockaddr_in servername; /* Create the socket. */ sock = socket (PF_INET, SOCK_STREAM, 0); if (sock < 0) { perror ("socket (client)"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } /* Connect to the server. */ init_sockaddr (&servername, SERVERHOST, PORT); if (0 > connect (sock, (struct sockaddr *) &servername, sizeof (servername))) { perror ("connect (client)"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } /* Send data to the server. */ write_to_server (sock); close (sock); return EXIT_SUCCESS; } int runServer(void) { int sock,connectedSocket; struct sockaddr_in clientname; size_t size; /* Create the socket and set it up to accept connections. */ sock = make_socket(PORT); if (listen(sock, 1) < 0) { perror ("listen"); Test_Result=EXIT_FAILURE; return EXIT_FAILURE; } else printf("listening\n"); size = sizeof (clientname); connectedSocket = accept(sock, (struct sockaddr *) &clientname, &size); if ( -1 == connectedSocket ) { perror ("accept"); Test_Result=EXIT_FAILURE; return EXIT_FAILURE; } static int readCount=0; char* msg = new char[MAXMSG]; /* set up aio stuff */ struct aiocb aiocb_read; aiocb_read.aio_fildes = connectedSocket; aiocb_read.aio_offset = 0; aiocb_read.aio_buf = msg; aiocb_read.aio_nbytes = MAXMSG; aiocb_read.aio_reqprio = 0; aiocb_read.aio_sigevent.sigev_notify = SIGEV_NONE; aiocb_read.aio_sigevent.sigev_value.sival_ptr = (void *) &aiocb_read; int rc(0),rc1(0),rc2(0); struct aiocb* list_aiocb[1]; int read_inprogress(0); int quitit(0); while ( 0 == quitit ) { // read the socket rc = aio_read(&aiocb_read); if ( 0 != rc ) { fprintf(stderr,"aio_read() failed with rc=%d and errno=%d\n",rc,errno); perror("aio_read"); Test_Result=EXIT_FAILURE; return EXIT_FAILURE; } // an async i/o event occurred, since we dropped out of the aio_suspend() without error while ( 1 == read_inprogress ) { // suspend until the read is finished list_aiocb[0] = &aiocb_read; read_inprogress=1; rc = aio_suspend(list_aiocb,1,NULL); if ( -1 == rc ) { perror("aio_suspend"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } if ( 0 != rc ) { perror("unknown aio_suspend error"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } rc1 = aio_error(list_aiocb[0]); if ( EINPROGRESS == rc1 ) { // read still in progress } else { rc2 = aio_return(list_aiocb[0]); if ( -1 == rc2 ) { perror("aio_return for read"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } if ( ( 0 == rc1 ) || ( 0 == rc2 ) ) { // read finished successfully fprintf (stderr, "Server: %3d : rcv message: `%s'\n", readCount++,msg); read_inprogress=0; list_aiocb[0] = NULL; if ( 0 == strcmp(msg,"QUIT") ) quitit=1; } else { perror("unknown error in aio_return for read"); Test_Result=EXIT_FAILURE; exit (EXIT_FAILURE); } } } } close(connectedSocket); close(sock); fprintf(stderr,"runServer() is returning\n"); return EXIT_SUCCESS; } void spawn(void) { switch( fork() ) { case -1: perror("fork() failed"); Test_Result=EXIT_FAILURE; break; case 0: sleep(1); runClient(); exit(Test_Result); default: runServer(); int status; if ( -1 == wait(&status) ) perror("wait() failed"); break; } } int main() { spawn(); if ( EXIT_FAILURE == Test_Result ) fprintf(stderr,"test failed\n"); return Test_Result; } ------------------- code ends here ------------------------------ From owner-kaio@oss.sgi.com Wed Nov 29 10:47:54 2000 Received: by oss.sgi.com id ; Wed, 29 Nov 2000 10:47:44 -0800 Received: from bacall.jsc.nasa.gov ([139.169.132.234]:41479 "EHLO bacall.jsc.nasa.gov") by oss.sgi.com with ESMTP id ; Wed, 29 Nov 2000 10:47:14 -0800 Received: from lincom-asg.com (IDENT:jgraham@localhost.localdomain [127.0.0.1]) by bacall.jsc.nasa.gov (8.9.3/8.9.3) with ESMTP id MAA17832 for ; Wed, 29 Nov 2000 12:47:08 -0600 Message-ID: <3A254F2C.875C64EC@lincom-asg.com> Date: Wed, 29 Nov 2000 12:47:08 -0600 From: Jeff Graham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: Re: what's wrong with this code? References: <3A254AB6.B88D6358@lincom-asg.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Never mind... it was the absence of one line of code... Works great now. Apologies for the wasted bandwidth :( -Jeff