Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbcCaGR0 (ORCPT ); Thu, 31 Mar 2016 02:17:26 -0400 Received: from e06smtp06.uk.ibm.com ([195.75.94.102]:39518 "EHLO e06smtp06.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbcCaGRY convert rfc822-to-8bit (ORCPT ); Thu, 31 Mar 2016 02:17:24 -0400 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: rapoport@il.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Message-Id: <201603310617.u2V6HIkt008006@d06av12.portsmouth.uk.ibm.com> X-IBM-Helo: smtp.notes.na.collabserv.com X-IBM-MailFrom: rapoport@il.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org In-Reply-To: <20160330170419.GG7822@mtj.duckdns.org> To: Tejun Heo Cc: Bandan Das , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, mst@redhat.com, jiangshanlai@gmail.com Subject: Re: [RFC PATCH 0/4] cgroup aware workqueues From: "Michael Rapoport" Date: Thu, 31 Mar 2016 08:17:13 +0200 References: <1458339291-4093-1-git-send-email-bsd@redhat.com> <201603210758.u2L7wiY9003907@d06av07.portsmouth.uk.ibm.com> <20160330170419.GG7822@mtj.duckdns.org> MIME-Version: 1.0 X-KeepSent: C42BE754:EBEED76C-C2257F87:001FA670; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 X-LLNOutbound: False X-Disclaimed: 5047 X-TNEFEvaluated: 1 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="US-ASCII" x-cbid: 16033106-0025-0000-0000-00000C840BBA X-IBM-ISS-SpamDetectors: Score=0.388783; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.388783; ST=0; TS=0; UL=0; ISC= X-IBM-ISS-DetailInfo: BY=3.00005100; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000155; SDB=6.00681151; UDB=6.00312626; UTC=2016-03-31 06:17:15 x-cbparentid: 16033106-5938-0000-0000-000002D322C9 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 40 Hello, > Tejun Heo wrote on 03/30/2016 08:04:19 PM: > > Hello, > > On Mon, Mar 21, 2016 at 09:58:39AM +0200, Michael Rapoport wrote: > > I did some performance evaluation of different threading models in vhost, > > and in most tests replacing vhost kthread's with workqueues degrades the > > performance. Moreover, having thread management inside the vhost provides > > There really shouldn't be any difference when using unbound > workqueues. workqueue becomes a convenience thing which manages > worker pools and there shouldn't be any difference between workqueue > workers and kthreads in terms of behavior. I agree that there really shouldn't be any performance difference, but the tests I've run show otherwise. I have no idea why and I hadn't time yet to investigate it. > > opportunity for optimization, at least for some workloads... > > What sort of optimizations are we talking about? Well, if we take Evlis (1) as for the theoretical base, there could be benefit of doing I/O scheduling inside the vhost. [1] https://www.usenix.org/system/files/conference/atc13/atc13-harel.pdf > Thanks. > > -- > tejun -- Sincerely yours, Mike.