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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 90EF4CA9EB9 for ; Thu, 24 Oct 2019 02:16:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2980F20684 for ; Thu, 24 Oct 2019 02:16:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="B8SvHU/r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2980F20684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6C21E6B0005; Wed, 23 Oct 2019 22:16:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 671BB6B0006; Wed, 23 Oct 2019 22:16:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5616B6B0007; Wed, 23 Oct 2019 22:16:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0188.hostedemail.com [216.40.44.188]) by kanga.kvack.org (Postfix) with ESMTP id 366AA6B0005 for ; Wed, 23 Oct 2019 22:16:37 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id DFC7C75BB for ; Thu, 24 Oct 2019 02:16:36 +0000 (UTC) X-FDA: 76077064392.02.fog26_39b0b27249f3e X-HE-Tag: fog26_39b0b27249f3e X-Filterd-Recvd-Size: 3326 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Oct 2019 02:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=n82/LvZl+GucMZK4YinIAcI1lwtheo/oC9RuQSaBEMw=; b=B8SvHU/rhOG2NTh0SA61tiq9d /tnJ+Pnfo/sCYaSQnLryDLbk+1rrK/SmAQd3WgNQLcZ7DwqzDGBG2mMg4QObmjgvhVa1gpSnTZo/T MdRG+p4o4mSxouvzqD3Zxa/sJBs1yeIWfiJbuntnoyXmhmjn2qHcktB6zH0bb8si41epnCyehBnVg 5aJP+oYOuo5EFYwmpGPWXa4wippARZBVovs68kwbw+NXXmMsZCdb5vkavMox6M/adYn0OKU/0WRVb OrohiMBsAKyzJxA3L3gWuY7NZRpkuW8v4tRtHZMOTo05gMp+AUh7bS5kexyR4NrOJtDqQytRomB+3 jrn0SJR6w==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNSfp-0002vA-89; Thu, 24 Oct 2019 02:16:25 +0000 Date: Wed, 23 Oct 2019 19:16:25 -0700 From: Christoph Hellwig To: Jason Gunthorpe Cc: Jerome Glisse , "christian.koenig@amd.com" , Andrea Arcangeli , "Yang, Philip" , Ralph Campbell , "linux-rdma@vger.kernel.org" , John Hubbard , "Kuehling, Felix" , "amd-gfx@lists.freedesktop.org" , "linux-mm@kvack.org" , "dri-devel@lists.freedesktop.org" , Ben Skeggs Subject: Re: [PATCH hmm 00/15] Consolidate the mmu notifier interval_tree and locking Message-ID: <20191024021625.GA5893@infradead.org> References: <20191021135744.GA25164@mellanox.com> <20191021151221.GC25164@mellanox.com> <20191022075735.GV11828@phenom.ffwll.local> <20191022150109.GF22766@mellanox.com> <20191023090858.GV11828@phenom.ffwll.local> <13edf841-421e-3522-fcec-ef919c2013ef@gmail.com> <20191023165223.GA4163@redhat.com> <20191023172442.GX22766@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023172442.GX22766@mellanox.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 23, 2019 at 05:24:45PM +0000, Jason Gunthorpe wrote: > mlx5 is similar, but not currently coded quite right, there is one > lock that protects the command queue for submitting invalidations to > the HW and it doesn't make a lot of sense to have additional fine > grained locking beyond that. IFF all drivers could agree on a lock type (rw_semaphore?) for this protection you could add a pointer to the range which would clear things up a lot. I'm just not sure you could get everyone to agree.