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 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 5BB36C433F5 for ; Thu, 6 Oct 2022 19:17:51 +0000 (UTC) Received: from localhost ([::1]:39742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogWNP-00047l-R2 for qemu-devel@archiver.kernel.org; Thu, 06 Oct 2022 15:17:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogW1g-0001ap-Gp for qemu-devel@nongnu.org; Thu, 06 Oct 2022 14:55:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogW1e-0007B7-NS for qemu-devel@nongnu.org; Thu, 06 Oct 2022 14:55:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665082517; 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=IWMZgsQrCmR6JpYaxE9bs22P3TDmlcFhSLZFk4YPQVM=; b=KMDJs949t6FfGmOFk5V80I4ogS1xhTdJ+bN2FLVhiRrrkpsoAq6swWAOwTmYr4/aNHFXGK /Dw9Zqn/aHlq2bSyv4VAtrKsYUpAEp+8vb1fIrfX9tSvEWt8I/JDVOxejHM3sr/Z83HpYL f4E+9a/sjimp+29eDdwUAyRCYsAWedM= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-470-x0Y510ZDO86ZhGUMDCWmtg-1; Thu, 06 Oct 2022 14:55:16 -0400 X-MC-Unique: x0Y510ZDO86ZhGUMDCWmtg-1 Received: by mail-io1-f71.google.com with SMTP id f25-20020a5d8799000000b006a44e33ddb6so1733318ion.1 for ; Thu, 06 Oct 2022 11:55:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IWMZgsQrCmR6JpYaxE9bs22P3TDmlcFhSLZFk4YPQVM=; b=QhbEDwge8kLzpjw7A1dEQJ0dg0tgyjUnZM5TlRpArh5KAKZczEEvnxIJY3vF47UIQa q3uVls0U9HJYohyE5h0Saa4m3gIBtl47UCLG8GuGUA+KpuYEOonkmMkxwKa9/2WjZBJv z8n5Eaklb59jRL1FWjc8o4/q3Yk5VCeWq1EX6B0sVaZHWYGl8kPjYKjNOCe0Spn4Ruhr 8i9klo1mTpxXaiZaam5CysuBTlhaa5NWGQn7gb2R3eDTuaSz/Vj2FAP/Axd05QRr53NR x6yju5U0tFuCjnel0R+hpOrwS7fB2LpfNLymoap4EA9QovvXTijsqepZWk9cb1dj6QYQ LO9A== X-Gm-Message-State: ACrzQf3N4GJt/IFcKepu8VFj2d4DNGZcMST/bcEAV5Pr7CfKUn1CEp3a lq83E3pfJkDIh0WM65vAjC3xipv3COmnJ30VJBY+wj5LMPnbE2NtXFZEB2gl7IG2Zj1EUq8cuF2 JN85XT7Fcgub9hqOyNBLnRoI8CKBYdx4= X-Received: by 2002:a02:b80d:0:b0:35a:f049:b8b with SMTP id o13-20020a02b80d000000b0035af0490b8bmr612525jam.141.1665082515480; Thu, 06 Oct 2022 11:55:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Wr381F5U+vSW10poCt0Kp7Vkne8tq4cHOZaTpOiAjLsV8kXoevnwEiASXcRZrhZzpz7+OPvBJpgHR5M7rTSc= X-Received: by 2002:a02:b80d:0:b0:35a:f049:b8b with SMTP id o13-20020a02b80d000000b0035af0490b8bmr612492jam.141.1665082515334; Thu, 06 Oct 2022 11:55:15 -0700 (PDT) MIME-Version: 1.0 References: <20220927193431.22302-1-stefanha@redhat.com> <20220927193431.22302-12-stefanha@redhat.com> In-Reply-To: From: Alberto Faria Date: Thu, 6 Oct 2022 19:54:39 +0100 Message-ID: Subject: Re: [PATCH v5 11/12] blkio: implement BDRV_REQ_REGISTERED_BUF optimization To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Yanan Wang , Kevin Wolf , Markus Armbruster , John Snow , "Denis V. Lunev" , Xie Changlong , Eric Blake , integration@gluster.org, David Hildenbrand , Wen Congyang , Laurent Vivier , "Richard W.M. Jones" , Fam Zheng , Thomas Huth , Hanna Reitz , Eduardo Habkost , Peter Xu , Raphael Norwitz , Marcel Apfelbaum , Vladimir Sementsov-Ogievskiy , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Jeff Cody , qemu-block@nongnu.org, Paolo Bonzini , Richard Henderson , "Michael S. Tsirkin" , sgarzare@redhat.com Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=170.10.133.124; envelope-from=afaria@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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" On Thu, Oct 6, 2022 at 7:46 PM Stefan Hajnoczi wrote: > > Regardless, I'd say we want to map memory regions even if we don't > > strictly need to (in cases where we can do so at no additional cost), > > since that may improve performance for some drivers. > > The downside is that when s->mem_regions_pinned is true, virtio-mem and > anything else that calls ram discard cannot be used. Hmm right, losing that functionality would probably be worse than potentially losing some performance for some drivers. Maybe a good middle point would be to call blkio_map_mem_region() in blkio_register_buf() iff s->needs_mem_regions || !s->mem_regions_pinned. Alberto