lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Linux Jobs: Update
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.942 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site