From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Xu Subject: Re: reduce networking latency Date: Wed, 15 Oct 2014 14:30:02 -0400 Message-ID: References: <20140929090418.GA32069@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: kvm To: "Michael S. Tsirkin" Return-path: Received: from mail-ig0-f175.google.com ([209.85.213.175]:38343 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbaJOSaD (ORCPT ); Wed, 15 Oct 2014 14:30:03 -0400 Received: by mail-ig0-f175.google.com with SMTP id uq10so17984307igb.2 for ; Wed, 15 Oct 2014 11:30:02 -0700 (PDT) In-Reply-To: <20140929090418.GA32069@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2014-09-29 5:04 GMT-04:00 Michael S. Tsirkin : > On Wed, Sep 24, 2014 at 02:40:53PM -0400, David Xu wrote: >> Hi Michael, >> >> I found this interesting project from KVM TODO website: >> >> allow handling short packets from softirq or VCPU context >> Plan: >> We are going through the scheduler 3 times >> (could be up to 5 if softirqd is involved) >> Consider RX: host irq -> io thread -> VCPU thread -> >> guest irq -> guest thread. >> This adds a lot of latency. >> We can cut it by some 1.5x if we do a bit of work >> either in the VCPU or softirq context. >> Testing: netperf TCP RR - should be improved drastically >> netperf TCP STREAM guest to host - no regression >> >> Would you mind saying more about the work either in the vCPU or >> softirq context? > > For TX, we might be able to execute it directly from VCPU context. > For RX, from softirq context. > Which step is removed for TX and RX compared with vanilla? Or what's the new path? TX: guest thread-> host irq? TX: host irq-> ? Thanks. >> Why it is only for short packets handling? > > That's just one idea to avoid doing too much work like this. > > Doing too much work in VCPU context would break pipelining, > likely degrading stream performance. > Work in softirq context is not accounted against the correct > cgroups, doing a lot of work there will mean guest can steal > CPU from other guests. > >> Thanks a >> lot! >> >> >> Regards, >> >> Cong