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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 37738C32756 for ; Thu, 8 Aug 2019 10:24:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17B192173E for ; Thu, 8 Aug 2019 10:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389936AbfHHKY5 (ORCPT ); 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-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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