Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3636925ybv; Mon, 10 Feb 2020 03:45:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxnIuwsvAh1jjdC9ADHE8t/cFhBQOSUCj1r+ekH3GEjGus0/Kdz5sjAwyD9Xyqrymn2vTqx X-Received: by 2002:a9d:4c8e:: with SMTP id m14mr690229otf.245.1581335129440; Mon, 10 Feb 2020 03:45:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581335129; cv=none; d=google.com; s=arc-20160816; b=eloBXOlvMmeZBAP9CuPZjjhSG/YFUSGIbVt8z46C4vcgv3vsOa9K0WhoaQTIPl+ioX TMTTQUDuuuy6WgQXkR3d9WNUOOX0+f/iOl22twF52R0Y7PEAMOHIUFeLki7isfX1ofHR 2U9V2A/PmTgYJL2fSgzioqSdt/FMGOuttdyJMf0sIXwZaRG1bUP3EWRmF40py6fJ30Xa rVkp0qWz8kfrGxVQ4Ux0W6Mx1EHfOijgoNz6IjIZfDjYuMmbUKyG+axs/rBZVcrI8kJH +8BIdiB/+UYXoRWzqq2A6g8XLg/2y7bqaOwIp4uR54a5Yb3Euyd1a6RW10VKd+hWz9Er qsoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xB01AmvIMP2zlBp52cydjafDP6p81GAeFrzC/ZqXhLM=; b=S4eDVSxYrv56EtlshfgeP7/MPNSGvh4O9DY6zUBKIfQfJ8f6BdfwZdBFeJcYErqNcz yo7Bua1a5pk99pAukrGUK9cGvBkOT4qIIhgbd/h2k/8k370mMeHgAQBIhxLkXvB21fuz 9PcW5jv4cJzKbWd7ba/9FtqCpojscCw4Poagcd7ujtWHnwTV/YDIPv3wQnrQk9+B3K3a ulUB1sOx4rgmhKPDfUkechxA+hABawNhMkrHN9+Ox/8kOcE6ZYiLynGyYekXSG+Le7j0 YoEf3STDlp7bLx0lwruI9u7TkLrjVN2lkM9c3FUH60IE4cVg8QF5ArmLP6xBnTV80Q0s m+yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SLImoFJt; 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=pass (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 d2si62206oth.267.2020.02.10.03.45.17; Mon, 10 Feb 2020 03:45:29 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SLImoFJt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbgBJLpB (ORCPT + 99 others); Mon, 10 Feb 2020 06:45:01 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44525 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726950AbgBJLpB (ORCPT ); Mon, 10 Feb 2020 06:45:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581335100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xB01AmvIMP2zlBp52cydjafDP6p81GAeFrzC/ZqXhLM=; b=SLImoFJto6Pr7r3EJ6H6jSTIxWmHutbUBOPKzPZxrRpSwyWRNvRdTHreFs/BRPtka9PE27 ooxWg7nmUBtqSmzXxZoxBZnaJFiAL7CMip5Yf5gYsXxuq6RA+t1a0BZoSGoZWTeEy3Rmni 89FikhWSwvrNggVo6nlWsfZlkQTslgQ= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-UyWVeXFiOGiiXmqcUdephQ-1; Mon, 10 Feb 2020 06:44:57 -0500 X-MC-Unique: UyWVeXFiOGiiXmqcUdephQ-1 Received: by mail-qt1-f198.google.com with SMTP id b13so990763qtp.8 for ; Mon, 10 Feb 2020 03:44:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xB01AmvIMP2zlBp52cydjafDP6p81GAeFrzC/ZqXhLM=; b=R/SVmi7xndWtv7MMF66VbQNakj5QfJ1DAGmeSKnH4Q0QRIHRlGqzrX9xdDV/pbp+LB 2ncqgeWgPZhKq1uy89bPZLH1Ivzgc/a4XLxtvm72tNxN6Xe5A8j+JzlG0BaGPBi0WW/v hj1AglaBQ5yZGHY0KNhnKGrHycAYNMGLCys1QkRg2QDrQnGannxlUQbLSQSkJqxarWTB JkK6OYqKPnQ6gWTvc3rH8K84OCVHV5hroii9l24xUSuC/nmByleKk/8NTwZHGYXyyzSi W+ll4aYz7fIQ9RF6z/DeTellviTQIfh+F1lynt2crFkCKcvoZVCJ0flIcIbkZrFepCOH fefA== X-Gm-Message-State: APjAAAWGv1gGEbMs+uR7/Nz6FuoylyceLWg6fbYD83e77B3NxgXaVTpz SGrveaG9UTmE84MbpHzuGtge2U5I3avhIcOb+J0bPj1VH0dyQLyhcqmTsa3EmmS8jgIGBzZanAM T+RIaTMh8zko6e7KEuU9k5zLO X-Received: by 2002:ac8:163c:: with SMTP id p57mr9672537qtj.106.1581335096825; Mon, 10 Feb 2020 03:44:56 -0800 (PST) X-Received: by 2002:ac8:163c:: with SMTP id p57mr9672524qtj.106.1581335096584; Mon, 10 Feb 2020 03:44:56 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id 12sm12808qkv.29.2020.02.10.03.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 03:44:55 -0800 (PST) Date: Mon, 10 Feb 2020 06:44:50 -0500 From: "Michael S. Tsirkin" To: Zha Bin Cc: linux-kernel@vger.kernel.org, jasowang@redhat.com, slp@redhat.com, virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org, gerry@linux.alibaba.com, jing2.liu@linux.intel.com, chao.p.peng@linux.intel.com Subject: Re: [PATCH v2 0/5] virtio mmio specification enhancement Message-ID: <20200210062938-mutt-send-email-mst@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 10, 2020 at 05:05:16PM +0800, Zha Bin wrote: > We have compared the number of files and the lines of code between > virtio-mmio and virio-pci. > > Virtio-PCI Virtio-MMIO > number of files(Linux) 161 1 > lines of code(Linux) 78237 538 Something's very wrong here. virtio PCI is 161 files? Are you counting the whole PCI subsystem? Sure enough: $ find drivers/pci -name '*c' |wc -l 150 That's not reasonable, this includes a bunch of drivers that never run on a typical hypervisor. MMIO is also not as small as you are trying to show: $ cloc drivers/virtio/virtio_mmio.c include/uapi/linux/virtio_mmio.h 2 text files. 2 unique files. 0 files ignored. github.com/AlDanial/cloc v 1.82 T=0.01 s (230.7 files/s, 106126.5 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- C 1 144 100 535 C/C++ Header 1 39 66 36 ------------------------------------------------------------------------------- SUM: 2 183 166 571 ------------------------------------------------------------------------------- I don't doubt MMIO is smaller than PCI. Of course that's because it has no features to speak of - just this patch already doubles it's size. If we keep doing that because we want the features then they will reach the same size in about 4 iterations. -- MST