Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2437912imd; Fri, 2 Nov 2018 11:22:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5djkMLnpzcbNBy8UwPI+mH0MmKCTtLFtzyppYXO+udbei0vsi5Jb85/jUjvnF3eyre9mDsj X-Received: by 2002:a63:e943:: with SMTP id q3-v6mr11803188pgj.42.1541182947992; Fri, 02 Nov 2018 11:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541182947; cv=none; d=google.com; s=arc-20160816; b=ufcRP1nPlpj2ijdcMJ5jp4iaDEp1yUFep3D0+ZNCDasUobElVljyTXAA68LYkmbkBA J4PSFq2+O5JXW0kUm7gfFF3FNgjZKIQLgiUxmyITab9hAObE33CHg6bEJYYqRkyr7NmM VBJAjT2WYYzivZCpieYF8XqKHuQfi0zGEer1Xy/kucmH49roxU2+FFrfSmHCO4CKu95F jNLB/uNHUs0+ua3SGFEh7N0m45nCSdkNjD0vnt2PmQwNdFWztZ9idil53HUZDeYpS6SE rwvj76GSBtuMBUsqDG/7rtdZ90i86RdbNj7xP2sCswS/P8PY5quJ35uVxkNxP/ZRSc/s 64Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=AGXCMWcEWmPvl5v5OkO5ncS1Gpm0FNmwl1gpvytG6Eg=; b=ulzb8aT0Nit+PuemrQPuKffiicqzCOQbvQOBoSBBFEPJEfh9f5ruIgHyA6+4tHLg20 Q6jF2KRay7MtgTQcduv6ReGfAbZCy/o0J1O5rsyaKqv0dB44pEzWn7/DPVu2BG2jV9do VQzbTmk6q/tlmsAu9MZTI5YvkKnUAitHTILrX0c+bGaX61ykzrUW3p9F8W9W8e74Vtl1 UTLfNbXo4HU01SuYxakmOG+nTxeNCFwRt7tfpaPlTNRVQv0VGaRZKiD8uhsYTrqfB0Qg JK4bTsVm55CdaP9J/99b0/CcPMm8vx5mxsVCKKJs9mVUBZgUjI/mfNAhWsmkeKflMkJd 6ZxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oN8Ug2iB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si17281942pfg.121.2018.11.02.11.22.13; Fri, 02 Nov 2018 11:22:27 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=oN8Ug2iB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728239AbeKCD3t (ORCPT + 99 others); Fri, 2 Nov 2018 23:29:49 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44752 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbeKCD3t (ORCPT ); Fri, 2 Nov 2018 23:29:49 -0400 Received: by mail-qk1-f195.google.com with SMTP id n12so4471488qkh.11; Fri, 02 Nov 2018 11:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AGXCMWcEWmPvl5v5OkO5ncS1Gpm0FNmwl1gpvytG6Eg=; b=oN8Ug2iBE6YWWlg3i98/mZBCzKNxsmIMm9orZ7d2qg7+rpbUwC5wASJ80eE+chQytn 8GmMEvponN8gksoSiLvm9oR7P8DSUbFyQGVZEX0qfaSfPA2jlxP/tTnd19Ez0OaFpxAi S3XHK1j/MtNFtxw3ir42PfQ7qpzmnlINR0e8YloZksup6Be4AjfI1DMvSnLJ92Tq9KgA hV9c8i51c7kcVYo0LFHL9dQmtn9leyuNPsdDWM5KUtxfQmaQcQ03SyoX2s2LEe+7CeEl TJYPKT76C5IS2kzXDHXxAO82koYwLbOm/spCUOjuER6L0HXt1lGJlxlgj3EQAXRifehS 4cWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AGXCMWcEWmPvl5v5OkO5ncS1Gpm0FNmwl1gpvytG6Eg=; b=nIJICepZHkpGv81TH+9PPDMtpfqsgvHUfT7Hg3VyeI+Q2xk2g+LpruJBV/9mI9wsu0 PQTbjpizfqkgs70hqKx9fRrFKdoZOO4EBGDw0koyuojk3qNEKUPWvdzUD/mdfgBfe9JC MHya3fM2BBn4yPLPqipMeVMWnaygji0qVw2/5AsbL5uiDpHl5+PIDjMF26vOEAIOTmqH z5dHs65QZKMK/DMvA/oHsGpZ3zKlZmPiRfDOWX9gZB1IpRGe0N9oDXvowavJtu4jVnT/ TYtAOOUiY6PAnPEDb1MfzhLFCJeSEm9ywTgJyIiVjiOK/oMfXjaucO2TcLB3edMEvuv9 eRyA== X-Gm-Message-State: AGRZ1gJ4Ks6XHjKBKcFVgAXEYD8ULSbIzL1mYjJRP/OV90P36RoMY/Ih dfN7RiAIQlr9aZxz3aS71v7Y9BuHAhc= X-Received: by 2002:ac8:3790:: with SMTP id d16mr12052309qtc.20.1541182901956; Fri, 02 Nov 2018 11:21:41 -0700 (PDT) Received: from u1804-ini.default ([129.42.208.167]) by smtp.googlemail.com with ESMTPSA id m13-v6sm27210017qtm.20.2018.11.02.11.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Nov 2018 11:21:41 -0700 (PDT) From: Vitaly Mayatskikh To: "Michael S . Tsirkin" Cc: Jason Wang , Paolo Bonzini , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Vitaly Mayatskikh Subject: [PATCH 0/1] vhost: add vhost_blk driver Date: Fri, 2 Nov 2018 18:21:22 +0000 Message-Id: <20181102182123.29420-1-v.mayatskih@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vhost_blk is a host-side kernel mode accelerator for virtio-blk. The driver allows VM to reach a near bare-metal disk performance. See IOPS numbers below (fio --rw=randread --bs=4k). This implementation uses kiocb interface. It is slightly slower than going directly through bio, but is simpler and also works with disk images placed on a file system. # fio num-jobs # A: bare metal over block # B: bare metal over file # C: virtio-blk over block # D: virtio-blk over file # E: vhost-blk bio over block # F: vhost-blk kiocb over block # G: vhost-blk kiocb over file # # A B C D E F G 1 171k 151k 148k 151k 195k 187k 175k 2 328k 302k 249k 241k 349k 334k 296k 3 479k 437k 179k 174k 501k 464k 404k 4 622k 568k 143k 183k 620k 580k 492k 5 755k 697k 136k 128k 737k 693k 579k 6 887k 808k 131k 120k 830k 782k 640k 7 1004k 926k 126k 131k 926k 863k 693k 8 1099k 1015k 117k 115k 1001k 931k 712k 9 1194k 1119k 115k 111k 1055k 991k 711k 10 1278k 1207k 109k 114k 1130k 1046k 695k 11 1345k 1280k 110k 108k 1119k 1091k 663k 12 1411k 1356k 104k 106k 1201k 1142k 629k 13 1466k 1423k 106k 106k 1260k 1170k 607k 14 1517k 1486k 103k 106k 1296k 1179k 589k 15 1552k 1543k 102k 102k 1322k 1191k 571k 16 1480k 1506k 101k 102k 1346k 1202k 566k Vitaly Mayatskikh (1): Add vhost_blk driver drivers/vhost/Kconfig | 13 ++ drivers/vhost/Makefile | 3 + drivers/vhost/blk.c | 510 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 526 insertions(+) create mode 100644 drivers/vhost/blk.c -- 2.17.1