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

From: Andrew Morton (andrewm@uow.edu.au)
Date: Tue Jan 30 2001 - 18:34:42 EST


"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/



This archive was generated by hypermail 2b29 : Wed Jan 31 2001 - 21:00:37 EST