kaio
[Top] [All Lists]

KAIO + 2.4.17

To: kaio <kaio@xxxxxxxxxxx>
Subject: KAIO + 2.4.17
From: Arne Gehlhaar <gehlhaar@xxxxxxx>
Date: Fri, 12 Apr 2002 10:53:03 +0200
Organization: ISL Bremen
Reply-to: gehlhaar@xxxxxxx
Sender: owner-kaio@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
Hello everyone,

I have posted this before, but I didn't get any relpy. Now that there are at leat two people how actually read this list, I thought I could try again :-)

I am trying to apply the kaio patch to the 2.4.17 kernel. However there were a few problems that I would like somebody with better kernel and/or kaio knowledge than mine 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 real 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 (at least with Sybase ASE 11.0.3.3 on raw devices).

Any comments appreciated!

Arne

--
Institute of Shipping Economics and Logistics    http://www.isl.org/
Arne Gehlhaar                                mailto:gehlhaar@xxxxxxx
Universitaetsallee GW1 Block A                phone:+49.421.22096.49
D-28359 Bremen, Germany                         fax:+49.421.22096.55


<Prev in Thread] Current Thread [Next in Thread>