Re: sendfile+zerocopy: fairly sexy (nothing to do with ECN)

Andrew Morton (andrewm@uow.edu.au)
Wed, 31 Jan 2001 10:34:42 +1100


"David S. Miller" wrote:
>
> Andrew Morton writes:
> > The box has 130 mbyte/sec memory write bandwidth, so saving
> > a copy should save 10% of this. (Wanders away, scratching
> > head...)
>
> Are you sure your measurment program will account properly
> for all system cycles spent in softnet processing? This is
> where the bulk of the cpu cycle savings will occur.
>

It tries to. It runs n_cpus instances of this:

static void busyloop(int instance)
{
int idx;

for ( ; ; ) {
for (idx = 0; idx < busyloop_size; idx++) {
int thumb;

busyloop_buf[idx]++; /* Dirty a cacheline */
for (thumb = 0; thumb < 200; thumb++)
; /* twiddle */
busyloop_progress[instance * CACHE_LINE_SIZE]++;
}
}
}

At minimum priority.

And it measures how much these threads are slowed
down, wrt an unloaded system. So interrupt work
is definitely accounted for.

It needs work. It should walk the buffer in cacheline-sized
strides, should have tunable read-versus-write ratios, should
be scheduled with `idle' priority, should be bondable
to CPUs and should create PCI traffic. That means a in-kernel
implementation.

But tweaking this thing thus far has made only very small
differences in output.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/