Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2615055ybe; Thu, 12 Sep 2019 12:07:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyT46UVwC2Z5pkkHNU0bwQ7XRXQCCpCxlfm/4/xQAUkG2GusQjMZu5ryClz3Vd7ZiXrT0xx X-Received: by 2002:a17:906:2311:: with SMTP id l17mr35895949eja.12.1568315226286; Thu, 12 Sep 2019 12:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568315226; cv=none; d=google.com; s=arc-20160816; b=ycSsAwlwqbq8fsPOpRSVwdLiUa005PZq19NYRCro+cs4TsodMhff91nHaAi/DfQd5x VQipvQej1HyPnS2hZnZ4EkiGkL35aneroOg4XrCdDBUc+W+1MJGAnOKj9OvyGEPzu3Uj pQQGt5A6ahxrGHcvx26T16W7qaF/uH/5vv9XwVuJaP6m1laLsYli57hW8lbD5rBkspob AeexD3Dokqrgncvt+fkamtx09Wkn0eMupbePsIuijTKEPaJjbLwL9I5sUmeQ5Cp1IsRH KK5rtCGwk8sCKUtASaqLaR1AcdL7c8m9Cjr3sdhLoJPwRvLh4lsGymcah6rjlS/AEgQ3 9KAw== 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=0I/msTXMK3oeVIVr50/e/aSOEcjBKVeKIFb7hH02Hio=; b=oMPYVMShFdjuK5Ob5J6/EKJBXojFaSaXtrXBD0obDtmCCXIs09p8tecBEuOzBPm60c YTyrRAW5PK2YmwGW4lTyBrW7pZRHFXEXAlzaYAhWYCYK+JrcTelX8wtFTk/4SoFaJ5FQ uE6sjS+6caA4BI4yIIb2LO1Hh6b4qKO0B7p82D4Hgfc0iyXv037wArjX90s/wVeMoI4f YVwAkPiyR9Evct5hNbdXyIgsKoivI5/MqPn+xI9ywiuRsmZEhKUd65f5VtpaDpWONeNq 9aMI7r+AQaVNEDCM9KfxHRd+tPdXPscOS9vtBCu4K+3iYWkMAGxjGuDDeqRXppG392Mm 75qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=kRrrpxim; 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 x51si15382506eda.272.2019.09.12.12.06.42; Thu, 12 Sep 2019 12:07:06 -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=kRrrpxim; 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 S2387403AbfILRQ6 (ORCPT + 99 others); Thu, 12 Sep 2019 13:16:58 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:18978 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728269AbfILRQ5 (ORCPT ); Thu, 12 Sep 2019 13:16:57 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 12 Sep 2019 10:17:01 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 12 Sep 2019 10:16:57 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 12 Sep 2019 10:16:57 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 12 Sep 2019 17:16:57 +0000 Received: from rcampbell-dev.nvidia.com (172.20.13.39) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 12 Sep 2019 17:16:51 +0000 Subject: Re: [PATCH 1/4] mm/hmm: make full use of walk_page_range() To: Christoph Hellwig CC: , , , , , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Jason Gunthorpe , Andrew Morton References: <20190911222829.28874-1-rcampbell@nvidia.com> <20190911222829.28874-2-rcampbell@nvidia.com> <20190912082613.GA14368@lst.de> X-Nvconfidentiality: public From: Ralph Campbell Message-ID: <973b7159-513f-0776-668d-8ba1adf87f1c@nvidia.com> Date: Thu, 12 Sep 2019 10:16:51 -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: <20190912082613.GA14368@lst.de> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To DRHQMAIL107.nvidia.com (10.27.9.16) 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=1568308621; bh=0I/msTXMK3oeVIVr50/e/aSOEcjBKVeKIFb7hH02Hio=; 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=kRrrpximNrle4ueUTW3i6O9Mb0HqYE3SBDqBD8uvc6Pk1mWY4I5cAXt9LeMFFnbUQ rPbvrrX80AI7hACgTF3cHGGmoLyY1fF8xdUTnIpP57+U+5o/qmkuje1REYgxux/tHo epw+5Jl8KJNz5hkr0Slxr8vkyWnuGEIaql8P7F2UXYkothY48LnIZ30eP/FQjOB6pB gAObbpf2n5+xP6fIRhEHSJ7RZnSaexO5cHoQ8IIegdQ59WsiLu29hkDVFSJQTAzeIv fw996tl3wwsXISYoWQd9OcLICHrROIYQbJsIdSGB0yVRwkRzQcW03EG0Zg+rQLB2ol UxoOO/UNTLxSQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/12/19 1:26 AM, Christoph Hellwig wrote: >> +static int hmm_pfns_fill(unsigned long addr, >> + unsigned long end, >> + struct hmm_range *range, >> + enum hmm_pfn_value_e value) > > Nit: can we use the space a little more efficient, e.g.: > > static int hmm_pfns_fill(unsigned long addr, unsigned long end, > struct hmm_range *range, enum hmm_pfn_value_e value) > >> +static int hmm_vma_walk_test(unsigned long start, >> + unsigned long end, >> + struct mm_walk *walk) > > Same here. > >> + if (!(vma->vm_flags & VM_READ)) { >> + (void) hmm_pfns_fill(start, end, range, HMM_PFN_NONE); > > There should be no need for the void cast here. > OK. I'll post a v2 with the these changes. Thanks for the reviews.