Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1329925imu; Mon, 5 Nov 2018 18:49:48 -0800 (PST) X-Google-Smtp-Source: AJdET5dsIgt0O27oelwUGOC6/ram9DcpPxrcUCZM121C8OiBfaftEZiHHfA0kxWN4iftcw9G+P51 X-Received: by 2002:a65:620f:: with SMTP id d15-v6mr22907404pgv.120.1541472588281; Mon, 05 Nov 2018 18:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541472588; cv=none; d=google.com; s=arc-20160816; b=v3Gcyppx+MbhdVKQG7FAmMJalg/7F/l6rEeaGDcidtMGsdad9ZGkdZtFACPSQqZZkJ M+c+iDixd4KEl81UrQn61zWg46/kumuLtvymebQpKcn+fJtodbIAsA+Mmkh9sxEeXPvO bgl1IA38e7yzwTFP8xy+xdlz9cKqzmKt3RN0A2r5VuA61X0DaQo0m1w9OfyPsQEsQXyf as5avzYitFIo0XgBDh6ZegfWfIfPMHLYwKZ69/qi3I/XL4jWCTZco7vAxHYu8n1MTmZK P9xlhEyBCIMj1hre+Vc7WeRIvbxDogust6Ksvb5aeuUhhCsF7mhiK56WmrosS422r+iu /Ntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0F8yhljoQohNNonqMWrHST+2Rvr/w8Dh6RD8sBu9xZs=; b=CjdJhuIlPR76tMB0q74kTnrh1ctrDYOccw5WfeBQJzWywVlDARSFBp89AieAuWR0Et Gl47CIaEMc2/dteQ9Xq8Lm/1HPKBDqqpqBK92XIAMO3WyAxAusq8i/S8xCl1KJZf5Lnb r8BUQ29evUQWKu6y5H+ZlRuBjR+jUSuMaLGjQOJQfoQcTs8kN6aB7WDuj88imsvnJe31 sLbg0SCkoqcVIxbIStZl2Mqt7UPh+90DO9/AgYZFuVmgGmJxOH+5SxbUxAD5Q3drfESx 776sfCVXeKlPOdxMvaFyRUuEOW8i1qnnJYNTrK5Z5EC/3DkwC4D5osVw9vbKrJxF4uh8 hfQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6-v6si12090169plr.115.2018.11.05.18.49.32; Mon, 05 Nov 2018 18:49:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729513AbeKFMLx (ORCPT + 99 others); Tue, 6 Nov 2018 07:11:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40870 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727448AbeKFMLx (ORCPT ); Tue, 6 Nov 2018 07:11:53 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31E6C81DEA; Tue, 6 Nov 2018 02:48:59 +0000 (UTC) Received: from [10.72.12.184] (ovpn-12-184.pek2.redhat.com [10.72.12.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 089E019748; Tue, 6 Nov 2018 02:48:53 +0000 (UTC) Subject: Re: [PATCH 1/1] vhost: add per-vq worker thread To: Vitaly Mayatskih Cc: "Michael S . Tsirkin" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181102160710.3741-1-v.mayatskih@gmail.com> <20181102160710.3741-2-v.mayatskih@gmail.com> From: Jason Wang Message-ID: <617e0c54-7d11-09b6-21e5-968260107872@redhat.com> Date: Tue, 6 Nov 2018 10:48:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 06 Nov 2018 02:48:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/11/5 上午11:28, Vitaly Mayatskih wrote: > On Sun, Nov 4, 2018 at 9:53 PM Jason Wang wrote: > >> I wonder whether or not it's better to allow the device to specific the >> worker here instead of forcing a per vq worker model. Then we can keep >> the behavior of exist implementation and do optimization on top? > I was thinking about that too, but for the sake of simplicity it > sounds valid that if the user wanted 8 parallel queues for the disk, > they better be parallel, i.e. worker per queue. The rest of disks that > don't need high-performance, can have 1 queue specified. > If you allow device to specify the worker itself, you can do any kinds of mapping bettween work and worker kthread I think. The advantage of doing this is that you can keep the vhost-net untouched. This makes things a little bit easier and proving two kthreads is better than one for -net workload is probably not as easy as it looks. We may get boost in some cases but degradation for the rest. Thanks