From: Jason Gunthorpe Subject: Re: [PATCH 08/16] nouveau/hmm: fault one page at a time Date: Mon, 22 Jun 2020 14:22:33 -0300 Message-ID: <20200622172233.GA2874652@mellanox.com> References: <20200619215649.32297-1-rcampbell@nvidia.com> <20200619215649.32297-9-rcampbell@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200619215649.32297-9-rcampbell-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ralph Campbell Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jerome Glisse , John Hubbard , Christoph Hellwig , Ben Skeggs , Andrew Morton , Shuah Khan List-Id: nouveau.vger.kernel.org On Fri, Jun 19, 2020 at 02:56:41PM -0700, Ralph Campbell wrote: > The SVM page fault handler groups faults into a range of contiguous > virtual addresses and requests hmm_range_fault() to populate and > return the page frame number of system memory mapped by the CPU. > In preparation for supporting large pages to be mapped by the GPU, > process faults one page at a time. In addition, use the hmm_range > default_flags to fix a corner case where the input hmm_pfns array > is not reinitialized after hmm_range_fault() returns -EBUSY and must > be called again. Are you sure? hmm_range_fault is pretty expensive per call.. Jason