From owner-kaio@oss.sgi.com Sun Feb 6 04:47:29 2000 Received: by oss.sgi.com id ; Sun, 6 Feb 2000 04:47:20 -0800 Received: from adsl-63-198-73-118.dsl.lsan03.pacbell.net ([63.198.73.118]:61700 "EHLO turing.xman.org") by oss.sgi.com with ESMTP id ; Sun, 6 Feb 2000 04:47:01 -0800 Received: (from cbsmith@localhost) by turing.xman.org (8.9.3/8.9.3) id EAA03697 for kaio@oss.sgi.com; Sun, 6 Feb 2000 04:46:59 -0800 Date: Sun, 6 Feb 2000 04:46:59 -0800 From: Christopher Smith To: KAIO mailing list Subject: lio_listio() atomicity Message-ID: <20000206044659.D32153@xman.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Hi there. I still haven't moved to the 2.3.x branch so I can't test out the 2.3.x patch yet. :-( However, I have a question about lio_listio(). I'm still learning the aio API's, and I'm wondering about lio_listio() guaruntees of atomicity. I know from reading the POSIX definition of lio_listio() that there is no guaruntee about the order that a list of aiocb's will complete. What I'm wondering though is if there's any guaruntees about concurrency with regards to lio_listio(). For example, is it guarunteed that multiple aiocb's will be executing at once? For example, if I have 3 buffers: char *buf1 = "one"; char *buf2 = "two"; char *buf3 = "three"; Let's say I build a list of aiocb's that indicates that all 3 of these buffers should be written to the same file. Is there any guaruntee that the file won't look like this: ontthreewoe I already know from the spec that this is possible: onethreetwo or: twoonethree Additionally, I'm curious about the sig argument in lio_listio(). If the sig argument is set, and each of the individual aiocb's in the listio() list ALSO have their aio_sigevent field set. Do both signals get triggered? --Chris P.S.: Any feel as to whether lio_listio() provides significant performance advantages over aio_read() & aio_write()? From owner-kaio@oss.sgi.com Sun Feb 6 10:43:12 2000 Received: by oss.sgi.com id ; Sun, 6 Feb 2000 10:43:03 -0800 Received: from sgi.SGI.COM ([192.48.153.1]:44806 "EHLO sgi.com") by oss.sgi.com with ESMTP id ; Sun, 6 Feb 2000 10:42:46 -0800 Received: from madurai.engr.sgi.com ([163.154.5.75]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id KAA01822 for ; Sun, 6 Feb 2000 10:42:46 -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 KAA41131 for ; Sun, 6 Feb 2000 10:41:01 -0800 (PST) Message-ID: <389D4FCF.184B04B6@sgi.com> Date: Sun, 06 Feb 2000 02:41:19 -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: KAIO mailing list Subject: Re: lio_listio() atomicity References: <20000206044659.D32153@xman.org> 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 Christopher Smith wrote: > > Hi there. I still haven't moved to the 2.3.x branch so I can't test > out the 2.3.x patch yet. :-( > > However, I have a question about lio_listio(). I'm still learning the > aio API's, and I'm wondering about lio_listio() guaruntees of > atomicity. > > I know from reading the POSIX definition of lio_listio() that there is > no guaruntee about the order that a list of aiocb's will > complete. What I'm wondering though is if there's any guaruntees about > concurrency with regards to lio_listio(). For example, is it > guarunteed that multiple aiocb's will be executing at once? > > For example, if I have 3 buffers: > > char *buf1 = "one"; > char *buf2 = "two"; > char *buf3 = "three"; > > Let's say I build a list of aiocb's that indicates that all 3 of these > buffers should be written to the same file. Is there any guaruntee > that the file won't look like this: > > ontthreewoe > > I already know from the spec that this is possible: > onethreetwo > > or: > > twoonethree I don't believe the interweaving of the buffers is possible, since, presumably the offsets were specified correctly in the aiocb's even if they all write to the same file. For example, the write of "one" specifies an offset 0, the write of "two" specifies an offset of 3, the write of "three" specifes an offset of 6. This would guarantee only one possibility, "onetwothree". lio_listio() itself does not impose or relax any condition that the individual aio's do not possess. > > Additionally, I'm curious about the sig argument in lio_listio(). If > the sig argument is set, and each of the individual aiocb's in the > listio() list ALSO have their aio_sigevent field set. Do both signals > get triggered? Both the individual signals in each aiocb and the final signal for the completion of the whole list_io get triggered. > > P.S.: Any feel as to whether lio_listio() provides significant > performance advantages over aio_read() & aio_write()? Since the list_io uses fewer system calls, I'd think that it is more efficient, but then again it depends on your usage/requirements. For example, if you are going to use aio to achieve parallelism in the IO, you may just want to issue a whole bunch of IO's and wait for it. In this case, it would be more efficient to issue all the IOs with list_io and specify LIO_WAIT, rather than do it as individual aio_*() and aio_suspend(), etc. hope this helps! ananth. From owner-kaio@oss.sgi.com Sun Feb 6 16:07:58 2000 Received: by oss.sgi.com id ; Sun, 6 Feb 2000 16:07:48 -0800 Received: from adsl-63-198-73-118.dsl.lsan03.pacbell.net ([63.198.73.118]:2310 "EHLO turing.xman.org") by oss.sgi.com with ESMTP id ; Sun, 6 Feb 2000 16:07:29 -0800 Received: (from cbsmith@localhost) by turing.xman.org (8.9.3/8.9.3) id QAA05026; Sun, 6 Feb 2000 16:07:09 -0800 Date: Sun, 6 Feb 2000 16:07:09 -0800 From: Christopher Smith To: Rajagopal Ananthanarayanan Cc: KAIO mailing list Subject: Re: lio_listio() atomicity Message-ID: <20000206160709.A4396@xman.org> References: <20000206044659.D32153@xman.org> <389D4FCF.184B04B6@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In-Reply-To: <389D4FCF.184B04B6@sgi.com>; from ananth@sgi.com on Sun, Feb 06, 2000 at 02:41:19AM -0800 Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing On Sun, Feb 06, 2000 at 02:41:19AM -0800, Ananth Anathanarayanan wrote: > I don't believe the interweaving of the buffers is possible, since, > presumably the offsets were specified correctly in the aiocb's even > if they all write to the same file. For example, the write of "one" > specifies an offset 0, the write of "two" specifies an offset of 3, > the write of "three" specifes an offset of 6. This would guarantee > only one possibility, "onetwothree". lio_listio() itself does not > impose or relax any condition that the individual aio's do not > possess. This is the case of O_APPEND is not set. However, if you're doing sockets I would presume you'd have no choice but to use O_APPEND for a write. The spec for aio_write() says that it will guaruntee that appends on the same fd get done in the order they are invoked. I'm just wondering how tht plays out with lio_listio(). > > Additionally, I'm curious about the sig argument in lio_listio(). If > > the sig argument is set, and each of the individual aiocb's in the > > listio() list ALSO have their aio_sigevent field set. Do both signals > > get triggered? > Both the individual signals in each aiocb and the final signal for > the completion of the whole list_io get triggered. Ok. Then I assume I can have any one of them enabled, which is very convenient. > > P.S.: Any feel as to whether lio_listio() provides significant > > performance advantages over aio_read() & aio_write()? > > Since the list_io uses fewer system calls, I'd think that it is > more efficient, but then again it depends on your usage/requirements. > For example, if you are going to use aio to achieve parallelism > in the IO, you may just want to issue a whole bunch of IO's and > wait for it. In this case, it would be more efficient to issue > all the IOs with list_io and specify LIO_WAIT, rather than > do it as individual aio_*() and aio_suspend(), etc. > > hope this helps! Definitely helps a lot. I thought about using LIO_WAIT, but then I'd probably end up spawning several threads. So, I'll probably go with LIO_NOWAIT and then trap the signals. It should be fun. ;-) --Chris From owner-kaio@oss.sgi.com Thu Feb 17 07:36:46 2000 Received: by oss.sgi.com id ; Thu, 17 Feb 2000 07:36:36 -0800 Received: from giles.mail.com ([206.253.134.62]:44825 "EHLO giles.mail.com") by oss.sgi.com with ESMTP id ; Thu, 17 Feb 2000 07:36:13 -0800 Received: from mail.com (itsy.nakloft.com [199.105.130.30]) by giles.mail.com (8.9.3/8.9.3) with ESMTP id LAA05389; Thu, 17 Feb 2000 11:33:17 -0500 X-Chaos: Discordia Message-ID: <38AC15A9.1B629C3@mail.com> Date: Thu, 17 Feb 2000 10:37:13 -0500 From: Neal Katz Reply-To: nkatz@mail.com X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: ananth@sgi.com, kaio@oss.sgi.com Subject: KAIO getting started 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 I was hoping you could help me get started w/ KAIO. I wrote a small test program and got errno 38 "Function not implemented" calling aio_read. Environment: Fresh mandrake installation. I applied the 2.2.13 patch against my 2.2.14-15 kernel (mandrake distribution), selected asynch I/O in confg, rebuilt kernel and rebooted (I've build custom kernels before). Build the library Program: #include #include #include #include #include #include int main(int argc, char *argv[]) { aiocb_t cb; struct stat st; int rc; int fd; char *b; memset( &cb, 0, sizeof(cb) ); stat("/tmp/bigfile", &st); b = (char *)malloc(st.st_size+1); b[st.st_size] = 0; fd = open("/tmp/bigfile",O_RDWR ); cb.aio_fildes = fd; cb.aio_nbytes = st.st_size; cb.aio_buf = b; rc = aio_read(&cb); printf("read rc = %i errno = %i\n",rc,errno); if (rc==-1) { perror("aio_read failed"); return 1; } while(1) { rc = aio_error(&cb); printf("error rc = %i\n",rc); if (rc == EINPROGRESS) { sleep(1); } else { break; } } puts(b); close(fd); return 0; } Build Command cc test1.c -ldba The output is: read rc = -1 errno = 38 aio_read failed: Function not implemented Thanx, Neal Katz From owner-kaio@oss.sgi.com Thu Feb 17 07:39:56 2000 Received: by oss.sgi.com id ; Thu, 17 Feb 2000 07:39:46 -0800 Received: from giles.mail.com ([206.253.134.62]:46361 "EHLO giles.mail.com") by oss.sgi.com with ESMTP id ; Thu, 17 Feb 2000 07:39:36 -0800 Received: from mail.com (itsy.nakloft.com [199.105.130.30]) by giles.mail.com (8.9.3/8.9.3) with ESMTP id LAA05408 for ; Thu, 17 Feb 2000 11:36:41 -0500 X-Chaos: Discordia Message-ID: <38AC1675.AE09DB35@mail.com> Date: Thu, 17 Feb 2000 10:40:37 -0500 From: Neal Katz Reply-To: nkatz@mail.com X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: KAIO getting started 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 I was hoping you could help me get started w/ KAIO. I wrote a small test program and got errno 38 "Function not implemented" calling aio_read. Environment: Fresh mandrake installation. I applied the 2.2.13 patch against my 2.2.14-15 kernel (mandrake distribution), selected asynch I/O in confg, rebuilt kernel and rebooted (I've build custom kernels before). Build the library Program: #include #include #include #include #include #include int main(int argc, char *argv[]) { aiocb_t cb; struct stat st; int rc; int fd; char *b; memset( &cb, 0, sizeof(cb) ); stat("/tmp/bigfile", &st); b = (char *)malloc(st.st_size+1); b[st.st_size] = 0; fd = open("/tmp/bigfile",O_RDWR ); cb.aio_fildes = fd; cb.aio_nbytes = st.st_size; cb.aio_buf = b; rc = aio_read(&cb); printf("read rc = %i errno = %i\n",rc,errno); if (rc==-1) { perror("aio_read failed"); return 1; } while(1) { rc = aio_error(&cb); printf("error rc = %i\n",rc); if (rc == EINPROGRESS) { sleep(1); } else { break; } } puts(b); close(fd); return 0; } Build Command cc test1.c -ldba The output is: read rc = -1 errno = 38 aio_read failed: Function not implemented Thanx, Neal Katz From owner-kaio@oss.sgi.com Thu Feb 17 13:25:44 2000 Received: by oss.sgi.com id ; Thu, 17 Feb 2000 13:25:23 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:35158 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 17 Feb 2000 13:25:02 -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 NAA18376 for ; Thu, 17 Feb 2000 13:20:31 -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 NAA56236; Thu, 17 Feb 2000 13:21:57 -0800 (PST) Message-ID: <38AC6685.54213F99@sgi.com> Date: Thu, 17 Feb 2000 13:22:13 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_11smp i686) X-Accept-Language: en MIME-Version: 1.0 To: nkatz@mail.com CC: kaio@oss.sgi.com Subject: Re: KAIO getting started References: <38AC1675.AE09DB35@mail.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 Neal Katz wrote: > > I was hoping you could help me get started w/ KAIO. I wrote a small test > > program and got errno 38 "Function not implemented" calling aio_read. Hi Neal, You seem to have done all the right things. So, I'm going to guess that it's a problem with the syscall numbers. KAIO uses one new system call which is numbered 201. Please make sure that the corresponding entry in the syscall table is at position 201. You need to look into the file: kern/arch/i386/kernel/entry.S In 2.2.13, sys_vfork is at position 190. Make sure that there are exactly 10 ".long" entries after sys_vfork and the ".long SYMBOL_NAME(sys_aio)". If you are not sure of the above please send a copy of your entry.S file. regards, ananth. PS: are you part of kaio@oss.sgi.com? From owner-kaio@oss.sgi.com Thu Feb 17 16:18:55 2000 Received: by oss.sgi.com id ; Thu, 17 Feb 2000 16:18:45 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:2863 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 17 Feb 2000 16:18:19 -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 QAA16481 for ; Thu, 17 Feb 2000 16:13:47 -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 QAA55986 for ; Thu, 17 Feb 2000 16:16:40 -0800 (PST) Message-ID: <38AC8EE2.970E6C2@sgi.com> Date: Thu, 17 Feb 2000 16:14:26 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_11smp i686) X-Accept-Language: en MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: Re: KAIO getting started References: <3.0.32.20000217185018.02794d60@messagebox.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 Neal Katz wrote: > > The entry.S file looks okay from what you described, I've appended mine at > the end of the message anyhow. Double checked linux/.config and AIO is > selected, even dumped symbols from fs/read_write.o and verified that > sys_aio was compiled. Everything looked good. I'm including output from > "strace ./a.out", maybe that will help. > > I did join the mailing list, today. Didn't see any similar problems > mentioned in the archive. Hmm. I don't see anything wrong with the entry.S either. Ok, here's another thing to check. Run gdb on your vmlinux (btw, I hope you're running the right kernel!): ---------- % gdb ./vmlinux (gdb) p /x &sys_call_table $6 = 0x802edeac (gdb) p /x 0x802edeac + (201 * 4) $7 = 0x802ee1d0 (gdb) x /x 0x802ee1d0 0x802ee1d0 : 0x8012bdb8 (gdb) disas 0x8012bdb8 Dump of assembler code for function sys_aio: 0x8012bdb8 : push %ebp 0x8012bdb9 : mov %esp,%ebp [ ... ] ---------- Of course, the absolute hex numbers above are for my kernel and won't be the same in your vmlinux. But basically, I'm trying to see what's in the sys_call_table at 201'st entry. thanks, ananth. PS: I'm sending this to kaio just in case someone else ran into the problem, but didn't report it on the list. From owner-kaio@oss.sgi.com Fri Feb 18 12:59:52 2000 Received: by oss.sgi.com id ; Fri, 18 Feb 2000 12:59:32 -0800 Received: from adsl-63-198-73-118.dsl.lsan03.pacbell.net ([63.198.73.118]:6136 "HELO scherbius.xman.org") by oss.sgi.com with SMTP id ; Fri, 18 Feb 2000 12:59:11 -0800 Received: by scherbius.xman.org (Postfix, from userid 502) id 98E472FD70; Fri, 18 Feb 2000 12:59:06 -0800 (PST) Date: Fri, 18 Feb 2000 12:59:06 -0800 From: Christopher Smith To: KAIO mailing list Subject: Problems building KAIO on 2.3.46 kernel... Message-ID: <20000218125906.F4709@xman.org> Mail-Followup-To: KAIO mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.4i Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing So, I finally decided to try using the 2.3.x branch of the kernel series, and of course, I wasn't going to do it without my trust KAIO. ;-) Unfortunately, I'm running in to a compile time error in mm/filemap.c inside the function 'do_kaio_generic_read'. I tracked it down and was surprised to discover that the 'readpage' function had been removed from the inode_operations struct. Indeed, all the "page" related functions appear to be gone. They're now up in an "address_space_operations" structure. So, I'm not enough of a kernel hacker actual figure out what should be done here, but I thought I'd make everyone aware of the problem so that those who DO know enough can fix it. The patch that I going to experimented with is to change the line 2113 in filemap.c from: if ((ret = inode->i_op->readpage(filp->f_dentry, page))) to: if ((ret = inode->i_mapping->a_ops->readpage(filp->f_dentry, page))) No dice, however. ;-) --Chris From owner-kaio@oss.sgi.com Fri Feb 18 13:29:52 2000 Received: by oss.sgi.com id ; Fri, 18 Feb 2000 13:29:32 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:6014 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 18 Feb 2000 13:29:03 -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 NAA16354 for ; Fri, 18 Feb 2000 13:24:31 -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 NAA57306 for ; Fri, 18 Feb 2000 13:27:20 -0800 (PST) Message-ID: <38ADB948.A19663AF@sgi.com> Date: Fri, 18 Feb 2000 13:27:36 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_11smp i686) X-Accept-Language: en MIME-Version: 1.0 To: KAIO mailing list Subject: Re: Problems building KAIO on 2.3.46 kernel... References: <20000218125906.F4709@xman.org> 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 Christopher Smith wrote: > > So, I finally decided to try using the 2.3.x branch of the kernel > series, and of course, I wasn't going to do it without my trust > KAIO. ;-) > > Unfortunately, I'm running in to a compile time error in mm/filemap.c > inside the function 'do_kaio_generic_read'. I tracked it down and was > surprised to discover that the 'readpage' function had been removed > from the inode_operations struct. Indeed, all the "page" related > functions appear to be gone. They're now up in an > "address_space_operations" structure. > > So, I'm not enough of a kernel hacker actual figure out what should be > done here, but I thought I'd make everyone aware of the problem so > that those who DO know enough can fix it. > > The patch that I going to experimented with is to change the line 2113 > in filemap.c from: > > if ((ret = inode->i_op->readpage(filp->f_dentry, page))) > > to: > > if ((ret = inode->i_mapping->a_ops->readpage(filp->f_dentry, page))) > For a person who claims to be a non-kernel hacker, you are doing well! The address space ops are a recent change to the 2.3 series, and I don't have a patch with those changes yet. But, your change seems to be correct. Note, however, that I haven't looked into the locking model yet. So not sure whether the above change will lead to a dead lock (or a double trip), but I'd say go ahead with the change ... regards, ananth. From owner-kaio@oss.sgi.com Tue Feb 29 02:16:14 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 02:16:04 -0800 Received: from www.mezon.net ([212.108.197.44]:25873 "EHLO szorvor.mezon.net") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 02:15:51 -0800 Received: from localhost (agdolla@localhost) by szorvor.mezon.net (8.9.3/8.9.3) with ESMTP id LAA65603 for ; Tue, 29 Feb 2000 11:15:43 +0100 (CET) (envelope-from agdolla@mezon.net) Date: Tue, 29 Feb 2000 11:15:43 +0100 (CET) From: Gabor Dolla To: kaio@oss.sgi.com Subject: kaio patch on linux 2.2.14 kernel Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing Hi your patch didn't compile for me ... #if defined(CONFIG_RAW) && defined(CONFIG_AIO) /* * XXX Interfaces for AIO; ideally done through fops. */ int kaio_is_raw(struct file *filp) { return(filp->f_op == &sd_raw_fops); } ^^^^^^^^^^^^^^ it didn't find this global variable so I made a pre declaration prior to this function: struct file_operations sd_raw_fops ; the second problem was: void * kaio_raw_rw(int rw, struct file *filp, char *buf, size_t count, loff_t *ppos, int *error, struct semaphore *semp, struct kiobuf *iobufp) { return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp)); } the compiler said that sd_raw_rw needs 9 parameters so I changed it to: return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp, AS_USER)); was it only my problem ?? did I make the right modofication?? thanks Gabor From owner-kaio@oss.sgi.com Tue Feb 29 02:24:34 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 02:24:24 -0800 Received: from www.mezon.net ([212.108.197.44]:59409 "EHLO szorvor.mezon.net") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 02:24:13 -0800 Received: from localhost (agdolla@localhost) by szorvor.mezon.net (8.9.3/8.9.3) with ESMTP id LAA65738 for ; Tue, 29 Feb 2000 11:24:08 +0100 (CET) (envelope-from agdolla@mezon.net) Date: Tue, 29 Feb 2000 11:24:08 +0100 (CET) From: Gabor Dolla To: kaio@oss.sgi.com Subject: Re: kaio patch on linux 2.2.14 kernel In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing sorry I forgot to mentioned, it is in sd.c Gabor On Tue, 29 Feb 2000, Gabor Dolla wrote: > Hi > > your patch didn't compile for me ... > > #if defined(CONFIG_RAW) && defined(CONFIG_AIO) > /* > * XXX Interfaces for AIO; ideally done through fops. > */ > int > kaio_is_raw(struct file *filp) > { > return(filp->f_op == &sd_raw_fops); > } > ^^^^^^^^^^^^^^ > it didn't find this global variable > so I made a pre declaration prior to this function: > > struct file_operations sd_raw_fops ; > > the second problem was: > > void * > kaio_raw_rw(int rw, struct file *filp, char *buf, size_t count, loff_t > *ppos, > int *error, struct semaphore *semp, struct kiobuf *iobufp) > { > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp)); > } > > the compiler said that sd_raw_rw needs 9 parameters > > so I changed it to: > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp, > AS_USER)); > > was it only my problem ?? did I make the right modofication?? > > thanks > > Gabor > > > From owner-kaio@oss.sgi.com Tue Feb 29 08:54:16 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 08:54:07 -0800 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:64382 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 08:53:43 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id IAA02758 for ; Tue, 29 Feb 2000 08:56:50 -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 IAA69655; Tue, 29 Feb 2000 08:51:18 -0800 (PST) Message-ID: <38BBF8E3.CB43EE54@sgi.com> Date: Tue, 29 Feb 2000 08:50:43 -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: Gabor Dolla CC: kaio@oss.sgi.com Subject: Re: kaio patch on linux 2.2.14 kernel References: 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 Hi,m Just wondering why you have CONFIG_RAW. Have you also installed the Raw I/O patch off of oss.sgi.com? ananth. Gabor Dolla wrote: > > sorry I forgot to mentioned, it is in sd.c > > Gabor > > On Tue, 29 Feb 2000, Gabor Dolla wrote: > > > Hi > > > > your patch didn't compile for me ... > > > > #if defined(CONFIG_RAW) && defined(CONFIG_AIO) > > /* > > * XXX Interfaces for AIO; ideally done through fops. > > */ > > int > > kaio_is_raw(struct file *filp) > > { > > return(filp->f_op == &sd_raw_fops); > > } > > ^^^^^^^^^^^^^^ > > it didn't find this global variable > > so I made a pre declaration prior to this function: > > > > struct file_operations sd_raw_fops ; > > > > the second problem was: > > > > void * > > kaio_raw_rw(int rw, struct file *filp, char *buf, size_t count, loff_t > > *ppos, > > int *error, struct semaphore *semp, struct kiobuf *iobufp) > > { > > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp)); > > } > > > > the compiler said that sd_raw_rw needs 9 parameters > > > > so I changed it to: > > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp, > > AS_USER)); > > > > was it only my problem ?? did I make the right modofication?? > > > > thanks > > > > Gabor > > > > > > From owner-kaio@oss.sgi.com Tue Feb 29 10:50:56 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 10:50:47 -0800 Received: from www.mezon.net ([212.108.197.44]:18182 "EHLO szorvor.mezon.net") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 10:50:30 -0800 Received: from localhost (agdolla@localhost) by szorvor.mezon.net (8.9.3/8.9.3) with ESMTP id TAA70577; Tue, 29 Feb 2000 19:50:05 +0100 (CET) (envelope-from agdolla@mezon.net) Date: Tue, 29 Feb 2000 19:50:05 +0100 (CET) From: Gabor Dolla To: Rajagopal Ananthanarayanan cc: kaio@oss.sgi.com Subject: Re: kaio patch on linux 2.2.14 kernel In-Reply-To: <38BBF8E3.CB43EE54@sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-kaio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kaio-outgoing > > Just wondering why you have CONFIG_RAW. Have you > also installed the Raw I/O patch off of oss.sgi.com? Yes I did. Gabor From owner-kaio@oss.sgi.com Tue Feb 29 12:24:37 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 12:24:27 -0800 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:32037 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 12:24:10 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id MAA07177 for ; Tue, 29 Feb 2000 12:27:18 -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 MAA69134; Tue, 29 Feb 2000 12:21:46 -0800 (PST) Message-ID: <38BC2A6D.A73B1629@sgi.com> Date: Tue, 29 Feb 2000 12:22:05 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_11smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Gabor Dolla CC: kaio@oss.sgi.com Subject: Re: kaio patch on linux 2.2.14 kernel References: 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 Gabor Dolla wrote: > > > > > Just wondering why you have CONFIG_RAW. Have you > > also installed the Raw I/O patch off of oss.sgi.com? > > Yes I did. > I'll download the patches myself and see what's going on. Will let you know of an update before the end of the day, ananth. From owner-kaio@oss.sgi.com Tue Feb 29 18:20:13 2000 Received: by oss.sgi.com id ; Tue, 29 Feb 2000 18:20:03 -0800 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:64081 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 29 Feb 2000 18:19:41 -0800 Received: from madurai.engr.sgi.com (madurai.engr.sgi.com [163.154.5.75]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id SAA02907 for ; Tue, 29 Feb 2000 18:22:48 -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 SAA70415; Tue, 29 Feb 2000 18:17:26 -0800 (PST) Message-ID: <38BC7DC9.9E4D6340@sgi.com> Date: Tue, 29 Feb 2000 18:17:45 -0800 From: Rajagopal Ananthanarayanan X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.10-1SGI_11smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Gabor Dolla CC: kaio@oss.sgi.com Subject: Re: kaio patch on linux 2.2.14 kernel References: 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 Gabor Dolla wrote: > > Hi > > your patch didn't compile for me ... > > #if defined(CONFIG_RAW) && defined(CONFIG_AIO) > /* > * XXX Interfaces for AIO; ideally done through fops. > */ > int > kaio_is_raw(struct file *filp) > { > return(filp->f_op == &sd_raw_fops); > } > ^^^^^^^^^^^^^^ > it didn't find this global variable > so I made a pre declaration prior to this function: > > struct file_operations sd_raw_fops ; Hmm. sd_raw_fops is defined by the following patch ftp://oss.sgi.com/www/projects/rawio/download/sgi+straw2.2.13.patch which is the one you should be using on a vanilla linux kernel. > > the second problem was: > > void * > kaio_raw_rw(int rw, struct file *filp, char *buf, size_t count, loff_t > *ppos, > int *error, struct semaphore *semp, struct kiobuf *iobufp) > { > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp)); > } > > the compiler said that sd_raw_rw needs 9 parameters > > so I changed it to: > return(sd_raw_rw(rw, filp, buf, count, ppos, error, semp, iobufp, > AS_USER)); > > was it only my problem ?? did I make the right modofication?? > Yes this is the correct fix. Apparently the rawio patches have been upgraded since made the kaio patches. hope this helps, ananth.