Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp157306ybh; Mon, 20 Jul 2020 12:59:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy80wGf/CWib7znamLKd1A4a9D2DxQpdCoB1OK3F5VlaslpvXVjBORzfTYbO3pQ/ZhcE0nw X-Received: by 2002:a17:906:26c3:: with SMTP id u3mr21627933ejc.483.1595275143367; Mon, 20 Jul 2020 12:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595275143; cv=none; d=google.com; s=arc-20160816; b=MPBeJ2oZWCm+sJY44kdQsovCXxZNvt2fS8AciU6QAyiQn72nPEGE/cXYxHVVIniYXK 07DiSWtFkUb9XdZYW45hLsl7SZIlj8YH8O5wV6T8EtsZ+AYH4jGNpIdZXXah80bLNAow XyzKhAwUa0Cv/R0eOnrSYpOSS/gK7+3sRAF59LLqysCf43BXaDMat44hVvTsTWgEf4oa pTAs9SrOYFQ5HsGDxDoWG8GaxitVYNciyaCzRVeFCs6xXkT5Pp5e8idbfgaFZ8NuHbqc oFpqU7mcwvCxH/H8jBGLhCbzH3jE2Qhz6DBWfZBbz23HVsQ0duHjaI0/Z5W1vBUhKabr Bx2w== 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=nzFOiv8srTT17ev3ghl4SD5N/vrNK9T/lRfmkfDWwCU=; b=ftTvkl0EyZrHY/IyWsBkzkfXUcJnR3toQeKlTcGq6AQVKyc8kI8bVbF8KeqPS+6Ges /oWwm62B6YSKcRYv+cg60fl5F2ftqvFesjF8wLKlHiJzszLI+qP/jntro33uzf4YjKEm 5NlU41hFD2MygHtGkDvqUqnqwjeFFsxbTa5fvV9au4vw99hJcrv49hgowUNEC60w5Mkl DQqMrAb9k//8DZH9JkuAaWpEdfji1ye7laPaRsQNTrI0gWl2yg4s7ZXom23kiCk87z69 1ivEMWwlTd9jjWDoLM6jUQ49Gvu2QyMFIpp7vQfqmO/lmlKpeNyd5T3n7Tk4QBdeBr6m IBxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="ahX/MvXl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id n7si10815155edo.512.2020.07.20.12.58.40; Mon, 20 Jul 2020 12:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="ahX/MvXl"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730006AbgGTT6a (ORCPT + 99 others); Mon, 20 Jul 2020 15:58:30 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:17859 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgGTT6a (ORCPT ); Mon, 20 Jul 2020 15:58:30 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 20 Jul 2020 12:57:28 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 20 Jul 2020 12:58:29 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 20 Jul 2020 12:58:29 -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; Mon, 20 Jul 2020 19:58:20 +0000 Subject: Re: [PATCH v2 0/5] mm/migrate: avoid device private invalidations To: Jason Gunthorpe CC: , , , , , , "Jerome Glisse" , John Hubbard , "Christoph Hellwig" , Andrew Morton , Shuah Khan , Ben Skeggs , Bharata B Rao References: <20200713172149.2310-1-rcampbell@nvidia.com> <20200720184119.GT2021248@mellanox.com> From: Ralph Campbell Message-ID: Date: Mon, 20 Jul 2020 12:58:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200720184119.GT2021248@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=1595275048; bh=nzFOiv8srTT17ev3ghl4SD5N/vrNK9T/lRfmkfDWwCU=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ahX/MvXl4mWKZL8bYsSpYXFYCF1j2H+WklPaJedYNC3izYDz9/gEonxVY8pWvelei 8D5HOaf2ed1XTdHmNi1S+Dmfpw6FfW3jDV0wxxAUHWcL+XbRSHRhnPC10HZ5SoJ8v+ +JKqpTxedtabfVYuXbLvQrDLTvxs1Pl5o10Zot+RNKPkXf8qKBryS+JFksXL8Jswf0 kOOahoqG8L6OAuur6M62q/QUxaaCD/c0flHJNkAopEGJA0g+2D9XKwpRj8AwIbmRBk 1EEgH+iNpcDPOqmxRzE2T+83FriwpqLm2mQPCSL/RFOMHrnK7T5ZTkw3bGZddKsQCJ pVe1IpnYO28Jg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/20/20 11:41 AM, Jason Gunthorpe wrote: > On Mon, Jul 13, 2020 at 10:21:44AM -0700, Ralph Campbell wrote: >> The goal for this series is to avoid device private memory TLB >> invalidations when migrating a range of addresses from system >> memory to device private memory and some of those pages have already >> been migrated. The approach taken is to introduce a new mmu notifier >> invalidation event type and use that in the device driver to skip >> invalidation callbacks from migrate_vma_setup(). The device driver is >> also then expected to handle device MMU invalidations as part of the >> migrate_vma_setup(), migrate_vma_pages(), migrate_vma_finalize() process. >> Note that this is opt-in. A device driver can simply invalidate its MMU >> in the mmu notifier callback and not handle MMU invalidations in the >> migration sequence. >> >> This series is based on Jason Gunthorpe's HMM tree (linux-5.8.0-rc4). >> >> Also, this replaces the need for the following two patches I sent: >> ("mm: fix migrate_vma_setup() src_owner and normal pages") >> https://lore.kernel.org/linux-mm/20200622222008.9971-1-rcampbell@nvidia.com >> ("nouveau: fix mixed normal and device private page migration") >> https://lore.kernel.org/lkml/20200622233854.10889-3-rcampbell@nvidia.com >> >> Changes in v2: >> Rebase to Jason Gunthorpe's HMM tree. >> Added reviewed-by from Bharata B Rao. >> Rename the mmu_notifier_range::data field to migrate_pgmap_owner as >> suggested by Jason Gunthorpe. > > I didn't see anything stand out in this at this point, did you intend > this to go to the HMM tree? > > Thanks, > Jason Yes, please.