Ingo Oeser wrote: > > Hi Manfred, > > I'm running your patches [1] with sucess for a while now. > > Did you get any feedback about problems regarding these patches? > No feedback yet. > They seem to work for me, but there seems to be a memleak in > 2.4.x (x: 0-2), which I'm chasing down. > You are right, there's a stupid bug in my poll patch: p = kmalloc(PAGE_SIZE); free_page((unsigned long)p); This causes a memory leak for the slab control structures. > > [1] put on http://www.tu-chemnitz.de/~ioe/fastpipe.patch > That's davem's original I rewrote it because I didn't like the nested loops. pipe_read() and _write() were never easy to follow, and adding yet another set of goto & for(;;) loops is IMHO a bad idea. The main difference between my patch and davem's patch is that davem uses zerocopy for exactly PAGE_SIZE sized transfers, I only use it for transfers larger than PIPE_BUF. <<<<< davem's patch + if (count >= PAGE_SIZE && + !(filp->f_flags & O_NONBLOCK)) { <<<<<<< my patch + if (count > PIPE_BUF && chars == PIPE_SIZE && + (!(filp->f_flags & O_NONBLOCK))) { <<<<<<< On i386 PIPE_BUF is 4096, and thus * davem's patch is faster, since glibc by default writes in 4096 byte blocks * davem's patch breaks apps that assume that write(,PIPE_BUF) after poll(POLLOUT) never blocks, even for blocking pipes. I've attached the newest versions of both patches. -- Manfred