Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9972746ybi; Wed, 24 Jul 2019 13:19:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo1XelXiwHYQ/0COUgnyBLiz3kzobrwyUA/rddy2Qxb9JhFzV6RwuA0vbwjgrOXzqn2Z8c X-Received: by 2002:a63:2c8:: with SMTP id 191mr81837003pgc.139.1563999539908; Wed, 24 Jul 2019 13:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563999539; cv=none; d=google.com; s=arc-20160816; b=t4WsRGLkJqQsJunRAylJwkc5N+s1vWLocyndGyYjTpvMP/bg3zC0zMqBONajZx6318 dDOyD6YW6ErdmxvStjMzPAk4X+z9qLq3wTs9S5TAJzxHzjJXyK1dyp3LJ220qI3UpxjU YLHnrbkIAJlXKYAQQ9kTT0SGAayq40+hUEj7Ays86mFB53RcUK7VMVUi+T9wAetRR0SU POt0DOUVjRIxYV3RT0CDUS8Y5Pt0F2ZB7y1kGZvU6n/xOI6iT5y4AQQW/I5cxAed0pEY EThUVu2dER54+6bqkcgrO6a8jy0pRuOnTw5Ev2V6eoshJbZHvtu12k6eXEAerS9RB+3G wFeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=o1DvH7PppcliFCYzQ16HV/ZAX4qVLsHxUniBpxQa/jY=; b=Bd1w3kZxem+k0jGSyQKMbtgE+GskHlo3com66f5j2S5xFZXEHdxnxuNqnUuGhoBMR0 PKm+mzcyQ18TOIZGfIcQJAVI9hqfEGAYYzVLr91DTfoOU4f+3nIz3USIzQCuti7gN4Q7 p+3nvxbX4V2yXxApd2lCcF1j+XAVIQzYP3zMeLXJxuy9SE03VwOKWYpkgQbOE2IaZohy kDAGjHf5K3rddSRpIQaAQF3XTmns2LSnmQXSuPcYN2vdAohu+1UvCKjsnbS549xAiQzG Eg9ZQTSDD0K0JQqCjP1o/HVirkaH3nDdwVV2hXnUrDJ8eBGYavPWmxx9fwD/OgQ5eNJL i6MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="ndoC/wHw"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b93si15134670plb.11.2019.07.24.13.18.45; Wed, 24 Jul 2019 13:18:59 -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=@nvidia.com header.s=n1 header.b="ndoC/wHw"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728661AbfGXUR3 (ORCPT + 99 others); Wed, 24 Jul 2019 16:17:29 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:3155 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729015AbfGXTuL (ORCPT ); Wed, 24 Jul 2019 15:50:11 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 24 Jul 2019 12:50:11 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 24 Jul 2019 12:50:10 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 24 Jul 2019 12:50:10 -0700 Received: from rcampbell-dev.nvidia.com (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 24 Jul 2019 19:50:10 +0000 Subject: Re: [PATCH 2/2] mm/hmm: make full use of walk_page_range() To: Jason Gunthorpe , Christoph Hellwig CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= References: <20190723233016.26403-1-rcampbell@nvidia.com> <20190723233016.26403-3-rcampbell@nvidia.com> <20190724065146.GA2061@lst.de> <20190724115338.GA30264@mellanox.com> X-Nvconfidentiality: public From: Ralph Campbell Message-ID: <098df586-0713-1aaa-e546-5dc39ec30341@nvidia.com> Date: Wed, 24 Jul 2019 12:50:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190724115338.GA30264@mellanox.com> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1563997811; bh=o1DvH7PppcliFCYzQ16HV/ZAX4qVLsHxUniBpxQa/jY=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ndoC/wHwyfVcpAyH7LNSBQ5MX2jPUvphaKjtuXWIn8VrEDengx2WT/DuMJm+WRXZ3 PiR4+0PG/Pz7ee56d8OyGQsZxJrZ5A2V7MZNvqZFis7ml6ohw5wa2st0Jos9Y5kzNg g7l59/dvj6EoVy3z/aqFWJkaHBONxVgSCLNiVzM1kbOQVnxb90IhOdJwRwq7tIF3Nz VTUbGNfNBtyYlE2MTJQqJo5UKSiGbulBDq2IqNDlhVCGvx3Zaw1r9V4fRXoJzXuuX4 XQ0Dj9tUsa6iuS/8rbbUIOWUSVWpCP9NT4pEBjYNLvTsPg7WnHGyQ1yAE8U20LnIxq qc3g1j1fB5DSg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/24/19 4:53 AM, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 08:51:46AM +0200, Christoph Hellwig wrote: >> On Tue, Jul 23, 2019 at 04:30:16PM -0700, Ralph Campbell wrote: >>> hmm_range_snapshot() and hmm_range_fault() both call find_vma() and >>> walk_page_range() in a loop. This is unnecessary duplication since >>> walk_page_range() calls find_vma() in a loop already. >>> Simplify hmm_range_snapshot() and hmm_range_fault() by defining a >>> walk_test() callback function to filter unhandled vmas. >> >> I like the approach a lot! >> >> But we really need to sort out the duplication between hmm_range_fault >> and hmm_range_snapshot first, as they are basically the same code. I >> have patches here: >> >> http://git.infradead.org/users/hch/misc.git/commitdiff/a34ccd30ee8a8a3111d9e91711c12901ed7dea74 >> >> http://git.infradead.org/users/hch/misc.git/commitdiff/81f442ebac7170815af7770a1efa9c4ab662137e > > Yeah, that is a straightforward improvement, maybe Ralph should grab > these two as part of his series? Sure, no problem. I'll add them in v2 when I fix the other issues in the series. >> That being said we don't really have any users for the snapshot mode >> or non-blocking faults, and I don't see any in the immediate pipeline >> either. > > If this code was production ready I'd use it in ODP right away. > > When we first create a ODP MR we'd want to snapshot to pre-load the > NIC tables with something other than page fault, but not fault > anything. > > This would be a big performance improvement for ODP. > > Jason >