Messages in this thread | | | From | "Manfred Spraul" <> | Subject | Re: Linux Jobs: Update | Date | Tue, 14 Mar 2000 12:33:44 +0100 |
| |
From: "Chris Wedgwood" <cw@f00f.org> > I tried various things -- none changed the results significantly. In > the end I had both reader and writer doing buf[0]++ figuring and lazy > mappings or something would have to be trigger buy that.
Could you boot with profiling enabled (profile=1 on command line) and check readprofile?
The Linux pipe code has 2 problems: * it uses wake-all, and a semaphore: if you have multiple readers and writers, then you have an incredible amount of idle reschedules. This is no problem for pipes, but could be bad for fifo's. I wrote a patch, but Linus decided that this is to rare to optimize for. * it needs one task switch for 4 kB data transfer.
On Mon, Mar 13, 2000 at 02:04:38AM -0800, David S. Miller wrote: > > FreeBSD's pipe code plays vm tricks to not even copy the > data from one process to another. > Do you know how long a typical pipe write is? FreeBSD plays vm tricks for writes > 8 kB. I know that page table changes would kill SMP performance, but it might be possible to use a single-copy pipe transfer with kiovec's without any page table changes. [current code: 2 copies + lots of schedules]
./bw_pipe writes 64kB blocks, and thus linux needs 17 syscalls and 32 context switches for each 64k block. one "./bw_pipe" gives me 75000 context switches... -- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |