From patchwork Thu Jun 2 21:39:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Kujawski X-Patchwork-Id: 12868180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72D90C43334 for ; Thu, 2 Jun 2022 21:41:34 +0000 (UTC) Received: from localhost ([::1]:40584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwsZR-0001aQ-BR for qemu-devel@archiver.kernel.org; Thu, 02 Jun 2022 17:41:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwsXN-0008AJ-3R for qemu-devel@nongnu.org; Thu, 02 Jun 2022 17:39:25 -0400 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]:35906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1nwsXL-0006zw-FW for qemu-devel@nongnu.org; Thu, 02 Jun 2022 17:39:24 -0400 Received: from smtp2.mailbox.org (unknown [91.198.250.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4LDfY33szYz9sSr; Thu, 2 Jun 2022 23:39:19 +0200 (CEST) From: Lev Kujawski To: qemu-devel@nongnu.org Cc: Lev Kujawski Subject: [PATCH 0/1] IDE: Addressing slow PIO throughput Date: Thu, 2 Jun 2022 21:39:03 +0000 Message-Id: <20220602213904.19533-1-lkujaw@member.fsf.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4LDfY33szYz9sSr Received-SPF: pass client-ip=2001:67c:2050:101:465::107; envelope-from=lkujaw@member.fsf.org; helo=mout-u-107.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hello, Is there any mechanism within QEMU for an emulated device to handle string IO instructions (e.g., insw) directly? I have noticed that PIO transfers seem rather slow (~240 kb/s) when running QEMU on my computer, despite using a raw block device (SSD), aio=io_uring, and file.cache.direct=on. The attached patch improves the rate by about 50% for me, and I would appreciate feedback on whether this holds for others as well. Kind regards, Lev Kujawski Lev Kujawski (1): hw/ide/core: Accumulate PIO output within io_buffer prior to pwritev hw/ide/core.c | 62 ++++++++++++++++++++++++--------------- include/hw/ide/internal.h | 1 + 2 files changed, 39 insertions(+), 24 deletions(-)