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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6B6A6C433E6 for ; Fri, 19 Feb 2021 14:01:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D7FC464E5F for ; Fri, 19 Feb 2021 14:01:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7FC464E5F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 11F168D0027; Fri, 19 Feb 2021 09:01:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CF228D000A; Fri, 19 Feb 2021 09:01:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFF9C8D0027; Fri, 19 Feb 2021 09:01:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id D4F6F8D000A for ; Fri, 19 Feb 2021 09:01:11 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8A6FD1835B749 for ; Fri, 19 Feb 2021 14:01:11 +0000 (UTC) X-FDA: 77835179142.15.91B5756 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by imf22.hostedemail.com (Postfix) with ESMTP id D2100C001158 for ; Fri, 19 Feb 2021 14:01:08 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id v3so3937733qtw.4 for ; Fri, 19 Feb 2021 06:01:10 -0800 (PST) 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; bh=Uy9+p8EYLZ+2upxXdnXYCqgGljKcN5wTbKwGZwnqinY=; b=I5flSyH/gLTP7kfpLHlSgh5tXtA+Jh1EsK+6uIgyy09vUXp0IZUoyofNXle2UG8+9x 6bQcZMjTHGSnCjsIADBeVZNPoafr3TSU4gbVUKm8tx7gxct5TAh1oqibAjgx2ny24Qlv nA8b7dO5wJoNvKGJUaq5YdpKB1knNz20AuCjHXqPKjX/HXDnk9GUA8KprUxsiW5TqfOU 9o+5AHrQgpJl5wOCAeVJMcNlnBgpfbhD2hv2/vQ80bpHkUbm4gdpFUasgTAZI9JejzbF hWMAig8ep9wZI5JeASo7p/0n5GOB7qV6LVTspTVmRmVoA3TvIzBilhfwzcUDD73XF8lP SRsw== 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; bh=Uy9+p8EYLZ+2upxXdnXYCqgGljKcN5wTbKwGZwnqinY=; b=Gw6fUGMZKXvgnOxJVJ0pDdyqXHHLu7ty2RyS0dPZgv8joSx3Fd36N6D24fkJzUswwq zO0iSZxa0Kn7lGb2PGRgqcwNvKO5KF2okEKHI4lSGRWfPRgSGghPthaCxmZzXI+VG1j9 0FPb6kjnR3DQTBwzYxvy/NqA5lgKKUsEM1xywYKocqyBjNw8RWLtuYALQxYC5uipq1JJ iJ02S9Qx1sShLMEO3aIFFAH+vfQ9Uk9aDWE2o0rEYt8PWXIWct4nD6hEYvvOYEhZmc60 qCQF+LeREr7S34T9+HzSnLH+7hfB7lXJNBpfRuSqiaJ0MwznKiCk1GjXQ9QCMhX1lEx5 oZvA== X-Gm-Message-State: AOAM533cNBdTkTWu44iAtGoyoc2nTCRpX05hfNWYzHBC/SY0zmoZphOA 3wf2jOz+XrRHJrgZ7vyEQgLgRg== X-Google-Smtp-Source: ABdhPJwvDnWgEME/UBp5mpDqS0tmSE99XXBjYe+mDgcmjGaB5orYQxdcs7Ze95f3nVqD5XVW9Zc5qg== X-Received: by 2002:a05:622a:306:: with SMTP id q6mr8969998qtw.15.1613743266418; Fri, 19 Feb 2021 06:01:06 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id 14sm5338161qtx.84.2021.02.19.06.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 06:01:05 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lD6LB-00CPnQ-2t; Fri, 19 Feb 2021 10:01:05 -0400 Date: Fri, 19 Feb 2021 10:01:05 -0400 From: Jason Gunthorpe To: Christoph Hellwig Cc: Alistair Popple , linux-mm@kvack.org, nouveau@lists.freedesktop.org, bskeggs@redhat.com, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, dri-devel@lists.freedesktop.org, jhubbard@nvidia.com, rcampbell@nvidia.com, jglisse@redhat.com, daniel@ffwll.ch Subject: Re: [PATCH v2 1/4] hmm: Device exclusive memory access Message-ID: <20210219140105.GE2643399@ziepe.ca> References: <20210219020750.16444-1-apopple@nvidia.com> <20210219020750.16444-2-apopple@nvidia.com> <20210219094741.GA641389@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219094741.GA641389@infradead.org> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D2100C001158 X-Stat-Signature: nqg6eudues7bib8i3fbbt8szwmg45hoc Received-SPF: none (ziepe.ca>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=mail-qt1-f180.google.com; client-ip=209.85.160.180 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613743268-10525 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, Feb 19, 2021 at 09:47:41AM +0000, Christoph Hellwig wrote: > > diff --git a/include/linux/hmm.h b/include/linux/hmm.h > > index 866a0fa104c4..5d28ff6d4d80 100644 > > +++ b/include/linux/hmm.h > > @@ -109,6 +109,10 @@ struct hmm_range { > > */ > > int hmm_range_fault(struct hmm_range *range); > > > > +int hmm_exclusive_range(struct mm_struct *mm, unsigned long start, > > + unsigned long end, struct page **pages); > > +vm_fault_t hmm_remove_exclusive_entry(struct vm_fault *vmf); > > Can we avoid the hmm naming for new code (we should probably also kill > it off for the existing code)? Yes please, I'd prefer it if hmm.c was just the special page walker and not a grab bag of unrelated things Is there is a more natural place to put this in the mm for this idea? Jason