Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1668010ybh; Fri, 13 Mar 2020 05:23:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt7s0aD8GUNwRdx3V3kUFOgZBerrEs1tX3rTFIlJsp9d23PlL5gHefS1pL9eVeG9AV9m8gz X-Received: by 2002:a05:6808:298:: with SMTP id z24mr6590940oic.67.1584102209979; Fri, 13 Mar 2020 05:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584102209; cv=none; d=google.com; s=arc-20160816; b=ORFZ6Adi3YlxTB3jvkOCaNL5P4NWrFTbNYd2tkDci23qgUFBipz/vuSDBQt8eh/XJZ cnWRRmwNvw0m9BZWqQ7WTSAMaRMHjm5zfScehWWSfU6wYVk+le4NHQZq0ffJqChqzurD HAt4QuAmtNQOwUGex4XQZ6LhlJBKNnCawZRw6End2HxBP4mqxssM4HTUCChODVRl83cp gDwpxhXG2XRYbXFsEtxRT2Ck5GI3IYmTbORP1nVSsqk/bhCFkqZV1efq3Xwp8rDgyPwe bnxrrE+Dxu06yi11TcDA+kKW++YCFIGIScEqH0l3VnUrybnxi/p0bNEhwQS18nH5VU0J 81eQ== 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:dkim-signature; bh=M68LOzWrZXFkDlXwdy0ZNT0fx/04UzLIGSmzsrY5jic=; b=FOvS/kT0N0SRMJDaYemrroso/mSih2XMSk7eQNpC3JEtZjax9rdg9QSiBcKqM7qviK TEVpmrfV6pZG2qyb4M5+7YFS5q/rK+ujaWjycLLT5Te6n1oQ5Qv2ZUF22iVvc9+iaKXe xZNT7ySPG7yt+1/HsmfNGSrXnqkp+OkNZ7c621Mc2Yp8QDB4sBNPH9gnFVUVD6UXk/Ej CoGPRINlx4NTcUnB8lHWwtXSH/pdWChI62sjsdRaWW/zHu+VlH4sddXr2uydte0CdBLB UYfFTEHopRH3KUFGxTjiQGpQMUrKwj6Pq6e0VTfxieNcNpb5DxqOi85G56borzt77hhV eo0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=aB7dTDeW; 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 193si4393848oie.51.2020.03.13.05.23.17; Fri, 13 Mar 2020 05:23:29 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=aB7dTDeW; 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 S1726691AbgCMMWM (ORCPT + 99 others); Fri, 13 Mar 2020 08:22:12 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44274 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgCMMWM (ORCPT ); Fri, 13 Mar 2020 08:22:12 -0400 Received: by mail-qk1-f195.google.com with SMTP id f198so12014112qke.11 for ; Fri, 13 Mar 2020 05:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M68LOzWrZXFkDlXwdy0ZNT0fx/04UzLIGSmzsrY5jic=; b=aB7dTDeWRO4el1VBMvTJwNIIBoz2Wjnhxho0HYufVMJEfjmBfOpuXLwrcL7DLYTSVL iXSb0m0D+aT/tYpWBsL2bNpvPSJWkIZjs2CfdAUan/l98zTxRdtTma6YYvzo8IsdjmeC XjpTXwss/3scxmXZ1vucQUgiPyTk1Jlr3ieck4Dq0IQzCKdB9GNugPvvl2PU66GQC0ba r3+0UJMv2E+3dxC1Pp2bQ1aBHqUttR8DiIv7dEy+02WZk7GEVLrH8xgIr8IkFraOVMwa fvZKJh6aF9YuCjcvg3hbWNErJpk7l5MvrGncuH2L2y+/HWZyoRfI4t6qe0Y3hOR0A85C 4iLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M68LOzWrZXFkDlXwdy0ZNT0fx/04UzLIGSmzsrY5jic=; b=E42cl9QuE4I3QdzZqklXNO2oBrsm0lOoJc2/xJyGg1wq3rtsqZCdEr85wCoxYjcDm1 +sL9Zkn1H/Ll9ZOVyP8oOQ7SNp49AYwh/uMEuKfjSXDR4JuBSeqpphuzFIlV3dUhSbJ5 fESZMQgZsThULcvbTu9J7fRhZ6TmG9DxoA/h9Li9PpDXvw7FsAms9bNUTOpXxZAUR3mQ qC+Vy0+NzC1GO6hBzb/Wu8PUOmuSRLKOiVjZ81zK9L0rwzAD1zvdNXITPYh3s1z1yETu xOTBcWAPXMHIEUfB5ys0nqrVG3kkC3l1JnFn6lwl1KcD6q7LRg0zArNQn77ZaV5Nf0T4 SvzQ== X-Gm-Message-State: ANhLgQ1HJhrkbUBNrXnjJD+seQjhNKeU5R4yRFdyM59mK4MSpefFvNPv WUv5HUgt2SY/itG7KpThI1pY8w== X-Received: by 2002:a37:648:: with SMTP id 69mr13005055qkg.353.1584102131258; Fri, 13 Mar 2020 05:22:11 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id t55sm30553520qte.24.2020.03.13.05.22.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Mar 2020 05:22:10 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jCjKM-0001tj-5O; Fri, 13 Mar 2020 09:22:10 -0300 Date: Fri, 13 Mar 2020 09:22:10 -0300 From: Jason Gunthorpe To: Souptick Joarder Cc: jglisse@redhat.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/hmm.c : Remove additional check for lockdep_assert_held() Message-ID: <20200313122210.GB31668@ziepe.ca> References: <1584065460-22205-1-git-send-email-jrdr.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584065460-22205-1-git-send-email-jrdr.linux@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2020 at 07:41:00AM +0530, Souptick Joarder wrote: > walk_page_range() already has a check for lockdep_assert_held(). > So additional check for lockdep_assert_held() can be removed from > hmm_range_fault(). Is there a reason why you think this redundancy is bad? IMHO it makes it easier to understand the API contract if key top level APIs have their assumptions coded in lockdep. Jason