From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6781C04AB5 for ; Thu, 6 Jun 2019 13:51:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A47E220872 for ; Thu, 6 Jun 2019 13:51:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A47E220872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:60918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYsnT-0007xA-QY for qemu-devel@archiver.kernel.org; Thu, 06 Jun 2019 09:51:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYskv-0006LM-HK for qemu-devel@nongnu.org; Thu, 06 Jun 2019 09:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYskg-0001iW-Ow for qemu-devel@nongnu.org; Thu, 06 Jun 2019 09:48:23 -0400 Received: from relay.sw.ru ([185.231.240.75]:45552) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYskf-0001Hc-2t; Thu, 06 Jun 2019 09:48:22 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hYskZ-00004z-O0; Thu, 06 Jun 2019 16:48:15 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Thu, 6 Jun 2019 16:48:11 +0300 Message-Id: <20190606134814.123689-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 0/3] block: blk_co_pcache X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi all! Here is small new io API: blk_co_pcache, which 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 Vladimir Sementsov-Ogievskiy (3): block: implement blk_co_pcache block/stream: use blk_co_pcache nbd: improve CMD_CACHE: use blk_co_pcache include/block/block.h | 8 ++++++- include/sysemu/block-backend.h | 7 ++++++ block/io.c | 18 +++++++++----- block/stream.c | 19 +++++---------- nbd/server.c | 43 +++++++++++++++++++++++++++------- 5 files changed, 67 insertions(+), 28 deletions(-) -- 2.18.0