From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [PATCH 1/2] vhost: Reduce vhost_work_flush() wakeup latency Date: Wed, 14 Aug 2013 17:22:36 +0200 Message-ID: <520BA0BC.6080202@acm.org> References: <520B2B47.9040002@acm.org> <520B2B88.6020307@acm.org> <20130814113739.GE5430@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Asias He , kvm-devel To: "Michael S. Tsirkin" Return-path: Received: from georges.telenet-ops.be ([195.130.137.68]:35536 "EHLO georges.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125Ab3HNPWi (ORCPT ); Wed, 14 Aug 2013 11:22:38 -0400 In-Reply-To: <20130814113739.GE5430@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/14/13 13:37, Michael S. Tsirkin wrote: > On Wed, Aug 14, 2013 at 09:02:32AM +0200, Bart Van Assche wrote: >> If the TIF_NEED_RESCHED task flag is set, wake up any vhost_work_flush() >> waiters before rescheduling instead of after rescheduling. >> >> Signed-off-by: Bart Van Assche >> Cc: Michael S. Tsirkin >> Cc: Asias He > > Why exactly? It's not like flush needs to be extra fast ... I'm not worried about how fast a flush is processed either. But I think this patch is a nice cleanup of the vhost_worker() function. It eliminates the uninitialized_var() construct and moves the assignment of "done_seq" below the read of "queue_seq". Bart.