From owner-kaio@oss.sgi.com Fri Mar 8 02:59:49 2002 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g28Axn222829 for kaio-outgoing; Fri, 8 Mar 2002 02:59:49 -0800 Received: from amrum.isl.org (amrum.isl.uni-bremen.de [134.102.136.146]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g28Axe922822 for ; Fri, 8 Mar 2002 02:59:41 -0800 Received: from isl.org (mobydick.isl.uni-bremen.de [134.102.136.141]) by amrum.isl.org (8.9.3/8.9.3) with ESMTP id KAA30635 for ; Fri, 8 Mar 2002 10:59:34 +0100 Message-ID: <3C888B85.90007@isl.org> Date: Fri, 08 Mar 2002 10:59:33 +0100 From: Arne Gehlhaar Reply-To: gehlhaar@isl.org Organization: ISL Bremen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: kaio@oss.sgi.com Subject: kernel 2.4.17 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-kaio@oss.sgi.com Precedence: bulk Hello, I think I have successfully applied the kaio patch to the 2.4.17 kernel. However there were a few problems that I would like somebody with profound kernel and/or kaio knowledge to comment on... Two files failed to patch due to changes in the originals. These were easily applied manually, though: > patching file ./arch/i386/kernel/entry.S > Hunk #1 FAILED at 646. > 1 out of 1 hunk FAILED -- saving rejects to file ./arch/i386/kernel/entry.S.rej > patching file ./include/linux/sched.h > Hunk #1 FAILED at 395. > 1 out of 1 hunk FAILED -- saving rejects to file ./include/linux/sched.h.rej the real problems started with the ./mm/filemap.c The patch applied successfully, however I got a couple of compile errors when building the new kernel. The problems were a missing parameter in page_cache_alloc() and undeclared function page_cache_free(). Without any knowledge in kernel hacking and kaio issues, all I had was my common sense. Please have a look at the following patch and tell me if the changes I made to the filemap.c (after I applied the kaio patch) make any sense. --- filemap.c Fri Mar 8 08:51:53 2002 +++ /usr/src/linux/mm/filemap.c Wed Mar 6 17:16:51 2002 @@ -2537,7 +2537,7 @@ */ if (!page_cache) { spin_unlock(&pagecache_lock); - page_cache = page_cache_alloc(); + page_cache = page_cache_alloc(mapping); /* * That could have slept, so go around to the * very beginning.. @@ -2572,13 +2572,13 @@ if (ret) { /* recheck return from kaio_enqueue */ for (i--; i >=0; i--) { assert(kaiocb->kaio_pages[i]); - page_cache_free(kaiocb->kaio_pages[i]); + page_cache_release(kaiocb->kaio_pages[i]); } if (kaiocb->kaio_pages != &kaiocb->kaio_page_inline) kfree(kaiocb->kaio_pages); } if (page_cache) - page_cache_free(page_cache); + page_cache_release(page_cache); UPDATE_ATIME(inode); return ret; } As far as I can tell, the kernel is stable and the async i/o seems to be working. FYI: I run Sybase 11.0.3.3-6 with async i/o enabled on raw devices. Any comments appreciated! Arne -- Institute of Shipping Economics and Logistics http://www.isl.org/ Arne Gehlhaar mailto:gehlhaar@isl.org Universitaetsallee GW1 Block A phone:+49.421.22096.49 D-28359 Bremen, Germany fax:+49.421.22096.55