Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6674629ybh; Thu, 8 Aug 2019 03:57:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJhRgW2QZkpzOT7Rcp+ImlM7WFHZok38olFOw548qcfa8gn/WwCdI6k0hA/EApNO5YmZa2 X-Received: by 2002:a62:e403:: with SMTP id r3mr14216632pfh.37.1565261876342; Thu, 08 Aug 2019 03:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565261876; cv=none; d=google.com; s=arc-20160816; b=ZyaRa5N3AcpUNzgmzLebLMf+G9wx/PJGxhnZK7IhJQgsE/n2ChhPmzwHmYhtb3cYcf IozKNOh2Cz5l4jKQXrG2NwOutW6jIR11kX837bLuK1jimECB+MV+EalPrVHnELVIQx/+ tr2c3VAFBo7jRaqQBMh/G9rIdcjGd9TZQ37RubQ+8T0wF41W4PtmmcIG9+KT2QU4Et3n YhMG++uwspNlULT2XCYo/nt/3+DniRVdRGnXuzWpPArHYRIBk82DdF851FpvUuxXzS/T TzRnuQxksMiU86MlfdgYPaMrV+1p2GgZrmA9hBu0QRjhqs5eny9MCtMpnlB3SoqtSCt/ TitA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gqMcrLj1gVdJ2hsnWbaulPrTKyA0AE1cZMK6/01FJPg=; b=NlTczXRlGgPrTOp6NuJoJuq+m1VOgNzJIc/AI9sKNhKPfYxTkyANq01ruvPIQuyS1k E7DSIJbNBLfsWZ8sq8fhkiQAJJx7mqz4r1fv9bywNIvJhd9vpFIzIWpOWm8keJOgO0S9 UKRXS1Eb1OTUNYl4DG8uLWm3vGWqJroDoarzznD0OR4yWRuM1x5DRmfCyf+jT7eGLGL5 QWt1XMM7FIL6UC6dulBEl2q8AVuv2S4jhE9lhkxDeeDvxuaHvWsZnP2y43oYL+Joh3jM v6ipIo2Jm6KQE7+4SgSGa14OFb1dYGU7F9m28YtMXbgjsQ0Oran6HSjoOrXT/z/VMui2 CHEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a186si49722580pge.365.2019.08.08.03.57.41; Thu, 08 Aug 2019 03:57:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389968AbfHHKY5 (ORCPT + 99 others); Thu, 8 Aug 2019 06:24:57 -0400 Received: from verein.lst.de ([213.95.11.211]:45391 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389932AbfHHKY5 (ORCPT ); Thu, 8 Aug 2019 06:24:57 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3F93F227A81; Thu, 8 Aug 2019 12:24:52 +0200 (CEST) Date: Thu, 8 Aug 2019 12:24:52 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: linux-mm@kvack.org, Andrea Arcangeli , Christoph Hellwig , John Hubbard , =?iso-8859-1?B?Suly9G1l?= Glisse , Ralph Campbell , "Kuehling, Felix" , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , Dimitri Sivanich , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, intel-gfx@lists.freedesktop.org, Gavin Shan , Andrea Righi , Jason Gunthorpe , Christoph Hellwig Subject: Re: [PATCH v3 hmm 01/11] mm/mmu_notifiers: hoist do_mmu_notifier_register down_write to the caller Message-ID: <20190808102452.GA648@lst.de> References: <20190806231548.25242-1-jgg@ziepe.ca> <20190806231548.25242-2-jgg@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190806231548.25242-2-jgg@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 06, 2019 at 08:15:38PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > This simplifies the code to not have so many one line functions and extra > logic. __mmu_notifier_register() simply becomes the entry point to > register the notifier, and the other one calls it under lock. > > Also add a lockdep_assert to check that the callers are holding the lock > as expected. > > Suggested-by: Christoph Hellwig > Signed-off-by: Jason Gunthorpe Looks good: Reviewed-by: Christoph Hellwig