From patchwork Tue Jun 18 15:41:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 11002181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61CD6112C for ; Tue, 18 Jun 2019 16:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EB3928AFC for ; Tue, 18 Jun 2019 16:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4147B28AFD; Tue, 18 Jun 2019 16:21:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E08B328AFD for ; Tue, 18 Jun 2019 16:21:22 +0000 (UTC) Received: from localhost ([::1]:59506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdGrK-0007v9-7q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 18 Jun 2019 12:21:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34216) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdGFf-0007QJ-M5 for qemu-devel@nongnu.org; Tue, 18 Jun 2019 11:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdGFY-0005uz-Tu for qemu-devel@nongnu.org; Tue, 18 Jun 2019 11:42:24 -0400 Received: from relay.sw.ru ([185.231.240.75]:38516) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdGFT-0005Va-Ao; Tue, 18 Jun 2019 11:42:17 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1hdGFH-0002Sc-Ec; Tue, 18 Jun 2019 18:42:03 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Tue, 18 Jun 2019 18:41:59 +0300 Message-Id: <20190618154202.89107-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH v2 0/3] block: BDRV_REQ_PREFETCH X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, fam@euphon.net, vsementsov@virtuozzo.com, mreitz@redhat.com, stefanha@redhat.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi all! Here is small new read flag: BDRV_REQ_PREFETCH, which in combination with BDRV_REQ_COPY_ON_READ does copy-on-read without extra buffer for read data. This means that only parts that needs COR will be actually read and only corresponding buffers allocated, no more. This allows to improve a bit block-stream and NBD_CMD_CACHE v2: change interface to be just one flag BDRV_REQ_PREFETCH v1 was "[PATCH 0/3] block: blk_co_pcache" https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg01047.html Vladimir Sementsov-Ogievskiy (3): block: implement BDRV_REQ_PREFETCH block/stream: use BDRV_REQ_PREFETCH nbd: improve CMD_CACHE: use blk_co_pcache include/block/block.h | 8 +++++++- block/io.c | 18 ++++++++++++------ block/stream.c | 20 +++++++------------- nbd/server.c | 43 +++++++++++++++++++++++++++++++++++-------- 4 files changed, 61 insertions(+), 28 deletions(-)