On Fri, Jul 29, 2016 at 06:46:52PM -0400, Ted Unangst wrote:
> Alexander Bluhm wrote:
> > +   /* Avoid user land starvation. */
> > +   yield();
> 
> you don't need to yield here, the task framework should do that for you.

Perhaps the framework should do that, but it does not.  When I run
my splicing test on a qemu virtual machine with vio interfaces, an
interactive shell hangs completely while data is getting spliced
with full load.  The yield() keeps it interactive.

Adding a task increases througput for about 10%.  Without the yield()
it might be a bit faster, but hanging userland is really anoying.

I have tested it a year ago on real hardware, the result was the
same.  Back then there was a discussion wether a softnet interrupt
would be better.  It was a bit faster, but also could starve the
userland.  Now we are heading for threads in the network stack, so
I think a task with yield() is the best solution.

bluhm

Reply via email to