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,USER_AGENT_SANE_1 autolearn=ham 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 8455CC43331 for ; Sat, 28 Mar 2020 08:11:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4867220716 for ; Sat, 28 Mar 2020 08:11:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4867220716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D556F6B0010; Sat, 28 Mar 2020 04:11:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2DF56B0032; Sat, 28 Mar 2020 04:11:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1C176B0036; Sat, 28 Mar 2020 04:11:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0182.hostedemail.com [216.40.44.182]) by kanga.kvack.org (Postfix) with ESMTP id A863B6B0010 for ; Sat, 28 Mar 2020 04:11:50 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 78A651277 for ; Sat, 28 Mar 2020 08:11:50 +0000 (UTC) X-FDA: 76644052380.29.pet48_10010e065874a X-HE-Tag: pet48_10010e065874a X-Filterd-Recvd-Size: 2353 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Sat, 28 Mar 2020 08:11:49 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id ABAD168C4E; Sat, 28 Mar 2020 09:11:47 +0100 (CET) Date: Sat, 28 Mar 2020 09:11:47 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Jerome Glisse , Ralph Campbell , Felix.Kuehling@amd.com, linux-mm@kvack.org, John Hubbard , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Philip Yang , Jason Gunthorpe Subject: Re: [PATCH v2 hmm 4/9] mm/hmm: remove HMM_FAULT_SNAPSHOT Message-ID: <20200328081147.GB26015@lst.de> References: <20200327200021.29372-1-jgg@ziepe.ca> <20200327200021.29372-5-jgg@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200327200021.29372-5-jgg@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) 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 Fri, Mar 27, 2020 at 05:00:16PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > Now that flags are handled on a fine-grained per-page basis this global > flag is redundant and has a confusing overlap with the pfn_flags_mask and > default_flags. > > Normalize the HMM_FAULT_SNAPSHOT behavior into one place. Callers needing > the SNAPSHOT behavior should set a pfn_flags_mask and default_flags that > always results in a cleared HMM_PFN_VALID. Then no pages will be faulted, > and HMM_FAULT_SNAPSHOT is not a special flow that overrides the masking > mechanism. > > As this is the last flag, also remove the flags argument. If future flags > are needed they can be part of the struct hmm_range function arguments. > > Signed-off-by: Jason Gunthorpe > --- > Documentation/vm/hmm.rst | 12 +++++------- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- > include/linux/hmm.h | 5 +---- > mm/hmm.c | 17 +++++++++-------- > 5 files changed, 17 insertions(+), 21 deletions(-) Looks good, Reviewed-by: Christoph Hellwig