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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 015E2C432BE for ; Tue, 10 Aug 2021 12:56:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D920960FC4 for ; Tue, 10 Aug 2021 12:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241010AbhHJM5M (ORCPT ); Tue, 10 Aug 2021 08:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237734AbhHJM5J (ORCPT ); Tue, 10 Aug 2021 08:57:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAA32C0613D3; Tue, 10 Aug 2021 05:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5xXVhemuKO9PB7xet9GYCusT0JhdoHtmk7yZ9MlgjsA=; b=T9Pq6HiHO2eGXiXU/rruKoAgnH ZccJwXam6hSvP5msWz1/meKVk9Qqqo21zp/o3ZINkWutqGZ3e/Ar6X4U+BVQybv6XisgC3ow6m2VC W21FvSRO8lbSuEAV/Vs5YLuu6XUTndV/oQZDJYlpaPVMzqB7FoRiuMVpDslbDhGL6wL4xU6das6yb rJn+F8gWfAz/icar+buwTckcidNFScAQDRr7Zv7xgLf52Y/AEa0UnwmLj3zpJgo+GYtZrxI1DVF/K qEyJXr5uFQZzgr1ivii4bwu/eeC5SybzFV1307mhSe1hjGSyFVfI5DQH7FitTyEAtoHkx98tiJJZS aKVL3ojw==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDRHY-00C7oL-Jm; Tue, 10 Aug 2021 12:55:14 +0000 Date: Tue, 10 Aug 2021 13:55:00 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Alex Williamson , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, peterx@redhat.com Subject: Re: [PATCH 3/7] vfio/pci: Use vfio_device_unmap_mapping_range() Message-ID: References: <162818167535.1511194.6614962507750594786.stgit@omen> <162818325518.1511194.1243290800645603609.stgit@omen> <20210806010418.GF1672295@nvidia.com> <20210806141745.1d8c3e0a.alex.williamson@redhat.com> <20210810115722.GA5158@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210810115722.GA5158@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 08:57:22AM -0300, Jason Gunthorpe wrote: > I'm not sure there is a real performance win to chase here? Doesn't > this only protect mmap against reset? The mmap isn't performance > sensitive, right? > > If this really needs extra optimization adding a rwsem to the devset > and using that across the whole set would surely be sufficient. Every mmio read or write takes memory_lock.